Open imsergiobernal opened 4 years ago
I second this. If you set a breakpoint at say line 80, the debugger breaks at the code that corresponds to line 80 in the transpiled code, not the source code.
@imsergiobernal I didn't get it, how does it work if sourceMaps option is not set in tsconfig.json
and vscode launch sourceMaps
is set to false
?
Nevertheless I have the same issue when using debugger attached to docker and it also doesn't generate the .maps
inside the container. Breakpoints also doesn't work for some files.
I had this issue and figured out a solution just now. I fixed this by using the javascript debugger preview. You can achieve this by 2 ways:
"type": "node"
to "type": "pwa-node"
to force the debugger to use the new javascript debugger"debug.javascript.usePreview": true,
in your vscode configuration@imsergiobernal I didn't get it, how does it work if sourceMaps option is not set in
tsconfig.json
and vscode launchsourceMaps
is set tofalse
?Nevertheless I have the same issue when using debugger attached to docker and it also doesn't generate the
.maps
inside the container. Breakpoints also doesn't work for some files.
Any progress on this? For me the type is defaulted to pwa-node, so it cannot be the solution.
I've made some research in other threads:
Attach to a running docker container on my QNAP NAS, where ts-node-dev is running and listening on the port 9229 (by --inspect) on every IP. I manage to attach to the debugger, but the breakpoints seem not to work, I guess, because of the reason mentioned in the previous references above.
@delfinof: I'm sorry to mention you so often, but did you open a new issue back then? https://github.com/microsoft/vscode/issues/20355#issuecomment-281843426
When inspecting throught a docker container, breakpoint behavior looks weird. I think this behavior is done by a wrong source-mapping. image
vscode launch
tsconfig.json
package.json script (what docker runs)
ts-node-dev --files --transpileOnly --watch src/ --inspect=0.0.0.0:9229 -- src/index.ts