简体   繁体   中英

Visual studio code nodejs debug failure - request 'launch': cannot launch

On my windows 10 with nodejs and visualstudio code installed, I just can't debug with VS code even with sample code by Microsoft- https://code.visualstudio.com/docs/runtimes/nodejs

The error is " request 'launch': cannot launch target(reason:spawn node ENOENT) ", which looks like to be some configuration issue, and checked nodejs did install under C:\\Program Files\\nodejs.

I saw one same question on stackoverflow - visual studio code nodejs request 'launch': cannot launch target (reason: spawn node ENOENT) , but there's no help answer, would anyone have suggestion on this? Thanks in advance!

I am pretty sure this is because node has not been added to your PATH. That is to say, you can't just type "Node" anyway in command line and have it correctly open your Node installation.

Double check that Node is correctly added to your path first, then try again.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM