-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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
Conversation
R=@bajtos? @julianduque Can you wrap the documentation at 80 columns? Thanks. |
@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]; |
There was a problem hiding this comment.
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)
.
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. |
@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
@bnoordhuis AFAICT, this patch can be landed. |
Cheers, waiting for the CI to finish. |
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š <miroslav@strongloop.com>
CI looks healthy. Thanks both of you, landed in c4a308d. |
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
Currently clearBreakpoint error is confusing, it says script not found when there is no breakpoint, also
documentation doesn't include signature for clearBreakpoint.