-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Could not connect to the debugger when using the default port (0) #2690
Comments
VSCode does not support port 0 yet (microsoft/vscode#52373) @Cammisuli Do you think it makes sense to revert the change to the default port because vscode doesn't support it? |
@FrozenPandaz this is hard to balance; if we revert the change, then we will lose the dev experience of watching and reloading. |
Maybe revert this change and add a section about it in the documentation and let the user choose whether to set the port in the options to 0 or not. |
@fsystemdevelopment provides the solution for this. Also VSCode now provides the JavaScript debugging terminal where it’ll start debugging node scripts as soon as the command is executed. I’m gonna close this for now because the solution was provided. We can reopen if needed 🙂 |
I have the exact same config but still not being able to run the attach process
Any idea what I might be missing? |
@Cammisuli Do you have an example ( |
This issue has been closed for more than 30 days. If this issue is still occuring, please open a new issue with more recent context. |
Expected Behavior
Recently, I upgraded our project from Angular 8.x to 9.x, Nest 6.x to 7.x and Nx 8.x to 9.x. Since then the debugger could not connect to the process.
Current Behavior
After the upgrade and migration, only
passWithNoTests
been added to theangular.json
and there were no changes tonx.json
and any of thetsconfigs
.It is not working even without the changes to the files and only using the upgraded dependencies.
I am running the project from the terminal using
ng serve
and I tried reopeningVScode
, removing/reinstallingnode_modules
and also debugging using the Chrome'sdedicated Node DevTools for Node.js
.When adding
port
to the options inangular.json
it works without any problem.So it is probably related to #2510.
Steps to Reproduce
You can find my repro here. In
master
branch you can find the files before the upgrade, and innx9
branch the upgraded version.Or just run the following steps:
Create a new workspace using the latest v8:
Upgrade nx:
Add a breakpoint and run the api:
Try to attach to the process using the options
Debug: Attach to Node process
from theCommand Palette...
.Context
nx report
Relevant packages
Relevant project configuration in angular.json
The text was updated successfully, but these errors were encountered: