How can I add a breakpoint to debug my code? #4448
Answered
by
debs-obrien
debs-obrien
asked this question in
FAQ
-
I want to debug my custom extension so need to add a breakpoint |
Beta Was this translation helpful? Give feedback.
Answered by
debs-obrien
Jun 18, 2021
Replies: 2 comments
-
You should configure launch.json with the config below: {
"type": "node",
"request": "launch",
"name": "run some extension",
"program": "${workspaceFolder}/node_modules/@teambit/bit/dist/app.js",
"args": ["status"],
"console": "integratedTerminal",
"sourceMaps": true,
"internalConsoleOptions": "neverOpen",
"cwd": "${workspaceFolder}"
}, |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
debs-obrien
-
I couldn't get the above configuration to work unless I replaced The following configuration worked for me (assuming using vscode) to enable debugging and testing the currently selected test file. {
"name": "Bit: debug current test file",
"type": "node",
"request": "launch",
"runtimeExecutable": "bit",
"args": [
"test",
"*/${fileDirnameBasename}"
],
"cwd": "${workspaceRoot}",
"protocol": "inspector",
"console": "integratedTerminal",
"internalConsoleOptions": "neverOpen"
},
Although I couldn't add breakpoints to components referenced outside the tested components directory. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You should configure launch.json with the config below: