Node remote debugger attaches but don't stop at breakpoint

Hi,

I have setup node remote debugger for backend Typescript code with "Attach to Node.js/Chrome". The remote server is inside the Docker Compose environment and is connectable by debugger in localhost:9229. When I start the debugger the Docker Compose log indicates that the debugger is attached. But when I use the software the editor does not stop at breakpoint. Am I missing something or what seems to be the problem?

0
4 comments

I do like this

I try to make a sample project...

1

Attaching the debugger to a Node.js app run in docker container works fin for me

What do your dockerfile and docker-compose.yml look like? Sample project the issue can be repeated with would be helpful

0

Sorry for the late response. It turns out that the issue is that the breakpoints work in compiled .js files, but not in .ts files. There are source maps generated but I don't understand why they do not map the sources. Not sure it has anything to do with docker as I earlier suspected. The project has both .js and .ts files as sources.

This is from my package.json (command in docker compose is "npm run watch")

tsconfig.json

tsconfig.dist.json

Can you see some clue in those configurations? I try to make sample project if not. 

0

No clue unfortunately:( Do you have sourcemaps generated in the dist folder? Sample project would be helpful

0

Please sign in to leave a comment.