-
Notifications
You must be signed in to change notification settings - Fork 27.9k
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
Debug using NodeJS is resulting in vscode using "read only content from NodeJS" #26782
Comments
@ajayp how do you start your node.js program? |
@weinand - Apologizes for the delay, was away for a bit but back niow, I am using ngrok on my machine with the Google Functions Emulator https://github.com/GoogleCloudPlatform/cloud-functions-emulator/wiki/Debugging-with-Visual-Studio-Code The emulator is running from the same directory as my codel I am not sure if this answers your question fully, in future, I will be responding in a more timely manner. |
@weinand - not sure how much this helps, the issue is not present in version 1.2.1 of vscode which is the version I rolled back to. |
I can confirm this issue on VS Code I have a React Native project with a bunch of Node shims, but when I run the debugger on my Jest unit tests the shims are not there, code is jumping to node internal objects ( My configuration is: {
"type": "node",
"request": "launch",
"name": "Launch Current TestSuite",
"program": "${workspaceRoot}/node_modules/.bin/jest",
"args": [
"--runInBand",
"--no-cache",
"${file}"
],
"runtimeArgs": [
"--debug-brk=127.0.0.1:5858"
],
"port": 5858,
"sourceMaps": true
} |
What version of node are you using? In general it should not be necessary to explicitly set the debug port. So these lines should be removed: "runtimeArgs": [
"--debug-brk=127.0.0.1:5858"
],
"port": 5858, Instead if you want to control whether debug protocol is used, add a
"outFiles": [
"${workspaceRoot}/out/**/*.js"
] |
Thanks for your help! I had significant problems with node v8, so I downgraded to The details are in this stackoverflow post. I removed the superfluous configuration, but it still gives the same results and my unit tests succeed, where they should in fact fail (there are
Should I create a [UPDATE: I created an additional stackoverflow question for this: Debugging React Native with Node shims in VS Code] |
Since this issue is rather old and both VS Code and node.js have evolved, I'm closing it. |
Steps to Reproduce:
{
"version": "0.2.0",
"configurations": [
{
"name": "Debug Function",
"type": "node",
"request": "attach",
"port": 5858
}
]
}
The text was updated successfully, but these errors were encountered: