Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

debugger: improve clearBreakpoint error and docs #175

Closed
wants to merge 1 commit into from
Closed

debugger: improve clearBreakpoint error and docs #175

wants to merge 1 commit into from

Conversation

julianduque
Copy link
Contributor

Currently clearBreakpoint error is confusing, it says script not found when there is no breakpoint, also
documentation doesn't include signature for clearBreakpoint.

@bnoordhuis
Copy link
Member

R=@bajtos?

@julianduque Can you wrap the documentation at 80 columns? Thanks.

@julianduque
Copy link
Contributor Author

@bnoordhuis doc fixed

var scripts = this.client.scripts;
var keys = Object.keys(scripts);
for (var v = 0; v < keys.length; v++) {
var id = keys[v];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

L1476-L1478 can be IMO simplified to for (var id in scripts).

@bajtos
Copy link
Contributor

bajtos commented Dec 19, 2014

Quite a lot of extra complexity needed to print a correct message, but I suppose the UX gain is worth it.

The code looks correct to me, I did not run it myself though.

@julianduque
Copy link
Contributor Author

@bajtos fixed doc and simplified code with your suggestions

Currently clearBreakpoint error is confusing, it says
Script not found when there is no breakpoint, also
documentation doesn't include signature for clearBreakpoint
@bajtos
Copy link
Contributor

bajtos commented Dec 19, 2014

@bnoordhuis AFAICT, this patch can be landed.

@bnoordhuis
Copy link
Member

Cheers, waiting for the CI to finish.

bnoordhuis pushed a commit that referenced this pull request Dec 19, 2014
Currently clearBreakpoint error is confusing, it says "Script not found"
when there is no breakpoint, also documentation doesn't include
signature for clearBreakpoint.

PR-URL: #175
Reviewed-By: Miroslav Bajtoš <[email protected]>
@bnoordhuis
Copy link
Member

CI looks healthy. Thanks both of you, landed in c4a308d.

@bnoordhuis bnoordhuis closed this Dec 19, 2014
kunalspathak referenced this pull request in nodejs/node-chakracore Jan 22, 2016
If `--debug` is specified, the in-built 'Debug' object is exposed by
chakra.dll that has some [APIs](https://msdn.microsoft.com/en-us/library/bs12a9wf(v=vs.94).aspx) that node-uwp relies on. With my change in #155,
I had overriden 'Debug' global object and hence certain Debug APIs stopped
working with `--debug` switch. The original intent of adding `Debug` object
was that `util.js` fetches this object in Debugging context. In absense of
`--debug` flag this object is unavailable and hence `util.js` throws TypeError.

The fix is to expose `Debug` object only in the DebugContext (called from
`util.js`). If ran with `--debug`, by the time `utill.js` code executes, engine
would have already expose in-built `Debug` object and we won't overwrite it.
Without `--debug` we would override `Debug` object.

Thanks @agarwal-sandeep for helping debugging this issue.

Fixes : #175
boingoing pushed a commit to boingoing/node that referenced this pull request Apr 6, 2017
eti-p-doray pushed a commit to eti-p-doray/node that referenced this pull request May 28, 2024
syg pushed a commit to syg/node that referenced this pull request Jun 20, 2024
eti-p-doray pushed a commit to eti-p-doray/node that referenced this pull request Aug 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants