Reputation: 541
Experienced developer, but new to VSCode.
The following works for me:
The following does not work for me in my project:
But in a test project it does work, on the same server!
I run the following to initialize a test project:
npm init -y
I then create an index.js, add some test code to it, open the folder in VSCode, set breakpoints, debug and everything works as expected. NOTE I do NOT have to create a launch.json file for this to work! All it apparently needs is my package.json file as generated by npm.
My real project has an identical setup to the test project:
I am at a complete loss why it doesn't work for my real project. Since it works with the test project, it cannot be anything on the server (say firewalls or whatever).
Any help would be greatly appreciated. I have tried to google for many, many things, but I cannot find anything that helps.
Upvotes: 1
Views: 938
Reputation: 541
The answer seems to be related to permissions on my server, although I didn't get any information about that from VSCode. My test project was in my home dir on my server, my real project was not. When I moved my real project into my home dir, debugging worked immediately.
If anyone has any insights about why this stopped debugging from working, but not anything else...? Cause I could edit the files, create new ones, etc. just fine when the project was outside my home dir...
Upvotes: 1