Closed bastien-m closed 1 year ago
I'm trying to configure vscode debugger to work with swc-node and I can't find any documentation on how to setup that, Am I missing something?
I start my project using the following command line node -r @swc-node/register src/index.ts and I set my launch.json with this content
node -r @swc-node/register src/index.ts
{ "type": "node", "name": "Debug back server", "request": "launch", "cwd": "${workspaceFolder}/back", "runtimeExecutable": "node", "args": ["-r", "@swc-node/register", "src/index.ts"], "envFile": "back/.env", "console": "integratedTerminal", "internalConsoleOptions": "neverOpen", "env": { "NODE_ENV": "development" } },
It start my project properly but can't reach my breakpoint, since I guess the link between the source code and node is not set properly. Do you have any idea ?
Sorry to post an issue for that, I can't find any other way to ask this.
@bastien-m I had the same issue, I fixed it by adding "inlineSourceMap": true, inside compilerOptions of my tsconfig.json
"inlineSourceMap": true,
compilerOptions
tsconfig.json
@mikaoelitiana thx indeed it works ;) Maybe it could be put inside the documentation.
I'm trying to configure vscode debugger to work with swc-node and I can't find any documentation on how to setup that, Am I missing something?
I start my project using the following command line
node -r @swc-node/register src/index.ts
and I set my launch.json with this contentIt start my project properly but can't reach my breakpoint, since I guess the link between the source code and node is not set properly. Do you have any idea ?
Sorry to post an issue for that, I can't find any other way to ask this.