I have updated the node (v8.1.2). When I want to debug my previous test project in nodejs using NTVS (in visual studio 2017) I've gotten the following error:
StandardError: (node:5292) [DEP0062] DeprecationWarning:
node --debug
andnode --debug-brk
are invalid. Please usenode --inspect
ornode --inspect-brk
instead.
The problem is clear. The tool try to run the node --debug
to start the project.
The question is, how can I change node --debug
to node --inspect
in Visual Studio 2017 to running the test?
Also, I should have mentioned that I can't solve the problem by adding --inspect
into the Script Arguments.
I had this same issue, and it was fixed by updating to VS2017 version 15.2.
You should downgrade your nodejs to 7.0.0 or less. Use NVM on windows, see this post.
you can have several node´s version, on your computer.
luck!
I did this:
1.
mv /usr/local/bin/node /usr/local/bin/node_bin
2.
echo > /usr/local/bin/node
3.
editor /usr/local/bin/node
insert script:
chmod ugo+x /usr/local/bin/node
I will not say that the decision is elegant, but it helped me.
You should update the IDE vsc to the newest version(v1.13),my node version is v8.0.0 ;it can solve this problem.
You can use Chrome's DevTools to debug as below:
Start Node with
--inspect option ...
e.g.$node --inspect app.js
. You should see a console printout something likeOpen Chrome browser and browse to
chrome://inspect
. Click on "Open dedicated DevTools for Node" link.