vscode-node-debug | A VS Code debug adapter for node | Code Inspection library
kandi X-RAY | vscode-node-debug Summary
kandi X-RAY | vscode-node-debug Summary
A VS Code debug adapter for node
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of vscode-node-debug
vscode-node-debug Key Features
vscode-node-debug Examples and Code Snippets
Community Discussions
Trending Discussions on vscode-node-debug
QUESTION
Googling didn't get me vary far with this so I wanted to make a post about it.
In Visual Studio 2017 if you create a new Node.js Express 4 Application project, build it and debug it then the Node.js server will just crash and exit before you can read any output from the CMD window that it was running in.
Checking the log file C:\Users\matt\AppData\Local\Temp\vscode-node-debug2.txt
yielded no usable information for me. What was causing it to crash and how can it be fixed?
ANSWER
Answered 2019-Jun-14 at 13:35First, be sure you update your npm packages in Visual Studio by performing the following steps.
Right click and choose the appropriate option.
a. Install Missing npm Packages
b. Update npm Packages
That didn't fix the issue but it doesn't hurt. Now if you rebuild your project and debug it by pressing ctrl + F5
then it will pause on the error that is causing the Node.js server to crash.
So, The server is having trouble binding to port 1337
. I'm assuming that's because it's such a low port number and we're running Visual Studio as a regular user and not as an administrator. To change the port number to a higher value you can edit the app.js
file in Visual Studio.
I Changed the following line
to
Now, if you save everything, rebuild the project and debug it by clicking the debug button or pressing F5
the server will successfully start. The browser will still be directed to port 1337
instead of port 65073
though. After changing the port number in the address in the browser the page loads fine.
I'm not sure how make it open to the port we set. I'll update this post if I figure that part out.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install vscode-node-debug
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page