doc: match debugger output & instructions to master behavior#13885
doc: match debugger output & instructions to master behavior#13885hybrist merged 0 commit intonodejs:masterfrom
Conversation
doc/api/debugger.md
Outdated
There was a problem hiding this comment.
I do not see this line in 8.1.2 output.
doc/api/debugger.md
Outdated
There was a problem hiding this comment.
If you have not changed the code example below, this should still remain:
3 debugger;There was a problem hiding this comment.
Yeah, I wasn't sure about the exact "order" here. Because it first shows this and then later/below says (emphasis mine):
Inserting the statement
debugger;into the source code of a script will
enable a breakpoint at that position in the code:
I interpreted that as "this is showing the original script run, then you insert debugger, then you run it again".
doc/api/debugger.md
Outdated
There was a problem hiding this comment.
I do not see this line in 8.1.2 output.
doc/api/debugger.md
Outdated
There was a problem hiding this comment.
I see this order in 8.1.2:
debug> next
< world
break in myscript.js:5There was a problem hiding this comment.
Yep! Missed that one.
doc/api/debugger.md
Outdated
There was a problem hiding this comment.
It seems this also should be:
$ node inspect myscript.js
doc/api/debugger.md
Outdated
There was a problem hiding this comment.
I do not see this line in 8.1.2 output.
doc/api/debugger.md
Outdated
There was a problem hiding this comment.
2 -> 22 (due to copyright added recently):
debug> setBreakpoint('mod.js', 22)There was a problem hiding this comment.
Interesting. I think the current instruction happened to work because it was smart enough to "shift" beyond the comment. But using 22 is definitely less confusing. 👍
doc/api/debugger.md
Outdated
There was a problem hiding this comment.
2 -> 22:
break in test/fixtures/break-in-module/mod.js:22|
Maybe we also should update the link to redirected one (line 194): |
|
the last example may also be updated to: $ node --inspect index.js
Debugger listening on ws://127.0.0.1:9229/dc9010dd-f8b8-4ac5-a510-c1a114ec7d29
For help see https://nodejs.org/en/docs/inspector |
benjamingr
left a comment
There was a problem hiding this comment.
I'm LGTM if the nits raised by @vsemozhetbyt are attached - I see the same output as @vsemozhetbyt - without the "Debugger attached." line.
|
I'm not sure what's up with the "Debugger attached". I'm testing on macOS 10.12.5 if that makes any difference..? Anyhow, the straight-up wrong stuff should be fixed now. :) |
cjihrig
left a comment
There was a problem hiding this comment.
LGTM. If the output is different between master and Node 8, then this might need to be adjusted during backporting.
|
There is a small glimpse on the start, so I supposed this line was just rewritten on Windows. I've run this with redirection to a file and even have recorded a video and watched it frame by frame. There are some rewritten lines, but still, no "Debugger attached" among them:
�< Debugger listening on ws://127.0.0.1:9229/9ab1ed89-f254-4415-97eb-c99d61555806
< For help see https://nodejs.org/en/docs/inspector
�connecting to 127.0.0.1:9229 ... okdebug> �Break on start in test.js:1
> 1 (function (exports, require, module, __filename, __dirname) { global.x = 5;
2 setTimeout(() => {
3 debugger;
debug> |
|
Interesting. Will investigate what's up on Windows. One possible answer could be stdout vs. stderr - Line 396 in 6e2c29b Given current information I suspect this is a bug (?) on Windows. The message should be printed. |
6496ca3 to
b647f04
Compare
|
Landed in b647f04. |
PR-URL: #13885 Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
PR-URL: #13885 Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
PR-URL: #13885 Reviewed-By: Colin Ihrig <cjihrig@gmail.com>



Follow-up to #13777. Updates
debugger.mdwith instructions & output that match behavior in node 8 / master.Previously the instructions would at best trigger deprecation warnings and at worst fail completely.
Checklist
Affected core subsystem(s)
doc