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

Add support for Node.js and WebStorm debuggers #673

Merged
merged 1 commit into from
Jan 21, 2017
Merged

Add support for Node.js and WebStorm debuggers #673

merged 1 commit into from
Jan 21, 2017

Conversation

Marsup
Copy link
Contributor

@Marsup Marsup commented Jan 20, 2017

Probably fixes #651.

Read the readme to see how it works. I'm not using VS Code and have no idea how it works, so if you want it, feel free to contribute.

@Marsup Marsup added the feature New functionality or improvement label Jan 20, 2017
@Marsup Marsup requested review from geek and cjihrig January 20, 2017 13:37
@geek
Copy link
Member

geek commented Jan 20, 2017

@Marsup !!! looks great. Any chance to add a test, even to see if it just opens the inspector port ?

@geek geek added this to the 12.0.1 milestone Jan 20, 2017

**lab** can be started with the option `--inspect` which will run it with the Node.js native debugger enabled, breaking on the 1st instruction.

This debugger can be accessed using the URL that is printed in the console, or used in association with a few Chrome extensions ([Node.js V8 Inspector](https://chrome.google.com/webstore/detail/nodejs-v8-inspector/lfnddfpljnhbneopljflpombpnkfhggl), [NIM](https://chrome.google.com/webstore/detail/nim-node-inspector-manage/gnhhdgbaldcilmgcpfddgdbkhjohddkj/related), ...).
Copy link
Contributor

Choose a reason for hiding this comment

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

Instead of ..., maybe say etc.


As you may know, if your tests are associated with the command `npm test`, you can already run `npm test -- --inspect` to run it with the inspector and avoid creating another command.

**lab** also has automatic support for [WebStorm](https://www.jetbrains.com/webstorm/) debugger, just start a normal debugging session on your npm test script.
Copy link
Contributor

Choose a reason for hiding this comment

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

Add "the" before WebStorm.

@cjihrig
Copy link
Contributor

cjihrig commented Jan 21, 2017

Any chance to add a test, even to see if it just opens the inspector port ?

If Node is started with the debugger, there are some endpoints you can hit over HTTP to verify that it's running. For example, http://localhost:9229/json/list.

Copy link
Contributor

@cjihrig cjihrig left a comment

Choose a reason for hiding this comment

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

LGTM pending a test.

@geek geek merged commit bb6cc54 into master Jan 21, 2017
@geek geek deleted the inspect branch January 21, 2017 20:22
@Marsup
Copy link
Contributor Author

Marsup commented Jan 21, 2017

Sorry I'm gone for the weekend, maybe when I come back.

@lock
Copy link

lock bot commented Jan 9, 2020

This thread has been automatically locked due to inactivity. Please open a new issue for related bugs or questions following the new issue template instructions.

@lock lock bot locked as resolved and limited conversation to collaborators Jan 9, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature New functionality or improvement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement --inspect so debugging inside a test is possible?
3 participants