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

Turn Node Debug on/off (call V8 API) #388

Open
NikCanvin opened this issue Feb 15, 2017 · 5 comments
Open

Turn Node Debug on/off (call V8 API) #388

NikCanvin opened this issue Feb 15, 2017 · 5 comments

Comments

@NikCanvin
Copy link
Collaborator

No description provided.

@sam-github
Copy link
Contributor

Note that node has both a legacy (and soon to disappear) "debug" protocol (JSON over TCP, node --debug), and a newer "inspect" protocol (JSON over websockets, node --inspect).

Its the inspect protocol that should be turned on, its what can be used with current Chrome browsers (the TCP protocol has been deleted for a while, and will be gone from node in 8.x, likely).

@mattcolegate
Copy link
Member

There is no V8 API for turning debug on and off dynamically. Users are expected to end their Node process and restart it with the --debug or --inspect flags stated above. It might be possible to hook into Node's code that deals with these flags and manipulate them from there, but that is at the C source code level and would take more time than is available (I would probably write my own NPM module to do it!) I'm taking this issue out of scope for the current milestone.

@mattcolegate mattcolegate removed this from the 3.0 milestone Feb 21, 2017
@mattcolegate mattcolegate removed their assignment Feb 21, 2017
@sjanuary sjanuary closed this as completed May 2, 2017
@sam-github
Copy link
Contributor

I'm in process of making (or finding) a node (js or c++) API for turning inspector on/off, finding its UUID, etc.

@sjanuary
Copy link
Contributor

@sam-github feel free to reopen

@sam-github
Copy link
Contributor

@sjanuary I don't have that power, but feel free to give it to me! ;-)

Merged to master: nodejs/node#13228

Also, I found a legacy process._debugBegin(pid) which can be called on your own pid to turn debugging on, but has the downside that there is no way to know what the PORT is (hopefully its the default, but that is not guaranteed).

@sjanuary sjanuary reopened this Jun 12, 2017
@sjanuary sjanuary removed the ice box label Jun 12, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants