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

doc: update debugger.md #13777

Closed
wants to merge 1 commit into from
Closed

doc: update debugger.md #13777

wants to merge 1 commit into from

Conversation

vsemozhetbyt
Copy link
Contributor

@vsemozhetbyt vsemozhetbyt commented Jun 19, 2017

Checklist
Affected core subsystem(s)

doc, debugger

  1. Some output seems weird, but that is what we have in the Nod.js 8.1.1.

  2. Considering DeprecationWarning in the outputs, is Stability: 2 - Stable still valid?

  3. I've duplicated the note about UUID as it is a part of the debug output now.

  4. quit command from the old output throws now:

    debug> quit
    repl:1
    quit
    ^
    
    ReferenceError: quit is not defined
        at repl:1:1
        at ContextifyScript.Script.runInContext (vm.js:53:29)
        at Object.runInContext (vm.js:108:6)
        at REPLServer.controlEval [as eval] (node-inspect/lib/internal/inspect_repl.js:521:25)
        at REPLServer.onLine (repl.js:433:10)
        at emitOne (events.js:115:13)
        at REPLServer.emit (events.js:210:7)
        at REPLServer.Interface._onLine (readline.js:278:10)
        at REPLServer.Interface._line (readline.js:625:8)
        at REPLServer.Interface._ttyWrite (readline.js:904:14)
    debug>

    In the output of the help command there is only this suitable command:

    kill                  Kill a running application or disconnect

    but its behavior is weird: first, it duplicates header lines, then does nothing:

    debug> kill
    < Debugger attached.
    < Debugger listening on ws://127.0.0.1:9229/1af5b6a5-eb79-43be-9f15-f7ba31f8147e
    < For help see https://nodejs.org/en/docs/inspector
    
    debug> kill
    debug>

    .exit seems OK, so I've added it instead.

    I am not sure if some of these nits are bugs that should be addressed.

  5. test/fixtures/break-in-module/mod.js seems to be changed recently again (copyright added), so the corresponding example is also updated along with other changes in debug behavior.

  6. Inspector output is also updated.

  7. 'Chrome Debugging Protocol' link is replaced according to the current redirection.

@nodejs-github-bot nodejs-github-bot added debugger doc Issues and PRs related to the documentations. labels Jun 19, 2017
@Trott
Copy link
Member

Trott commented Jun 19, 2017

Yikes! Shouldn't inspector.md be Stable now (it says Experimental) and debugger.md be Deprecated?

@richardlau
Copy link
Member

@nodejs/diagnostics

@bnoordhuis
Copy link
Member

It should probably just be deleted. I forgot to when I removed lib/_debugger.js in #12495.

@targos
Copy link
Member

targos commented Jun 19, 2017

It should be updated to use node inspect instead of node debug. inspector.md is something else (it's the JS API for the inspector protocol and is still experimental).

@vsemozhetbyt
Copy link
Contributor Author

vsemozhetbyt commented Jun 19, 2017

So should we close this PR for now? I think I cannot completely refactor it for node inspect.

@jkrems
Copy link
Contributor

jkrems commented Jun 19, 2017

@vsemozhetbyt Thanks for looking into those docs & sorry that they are somewhat out of date now. I'll try to work on that later this week unless someone else volunteers earlier.

Quick explanation about "quit": "kill" kills the program being debugged so you can restart it w/o losing the debug session, e.g. breakpoints you set. It doesn't exit the CLI debugger itself like "quit" used to. I might have found that myself if I wouldn't developed the habit of using Ctrl+D to quit the debugger. :(

Generally @targos is right - debugger.md is our only documentation of the command line debugger. So it definitely should stick around in some shape or form. At this point it might make sense to split protocol (inspector.md) and CLI debugger (debugger.md) and cross-link..?

@vsemozhetbyt
Copy link
Contributor Author

@jkrems Thank you for the feedback. I think I better close this PR for now as the issue needs a more drastic solution. Feel free to reopen if I am wrong.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc Issues and PRs related to the documentations.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants