Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

626
Views
Webstorm- Nodemon + Typescript + Docker - debugger connected but breakpoints not working

I have a node project written in typescript. The process runs inside a docker container using Nodemon. node (via nodemon) is run inside the container with the --inspect option. When I try to connect with Webstorm to the process, it connects but no breakpoints are being hit.

This command used in the package.json to start:
tsc-watch --incremental --onFirstSuccess "sh -c 'tscpaths -p tsconfig.json -s ./src -o ./dist/src && nodemon -L --inspect=0.0.0.0:9229 dist/src/main.js --config nodemon-debug.json'" --onSuccess "sh -c 'tscpaths -p tsconfig.json -s ./src -o ./dist/src && touch ./dist/src/main.js

Explanation: use tsc-watch to to watch for changes in code. After first build success run tscpaths to replace path shortcuts, then run nodemon with the inspect option (which is passed to node). After each build success run tscpaths and touch the main.js file to trigger nodemon to restart the process.

nodemon config (watch only main.js file which is touched after every build by tsc-watch):

{
  "watch": [
    "./dist/src/main.js"
  ],
  "ext": "js"
}

Port 9229 of the docker container is mapped to port 9666 on the host machine in the docker-compose.yml, and in Webstorm I use the "Attach to Node.js/Chrome" configuration to attach to localhost port 9666.

The tsconfig.json file includes "sourceMap": true.

This whole process of automatic build + restart on every code change works. The debugger is attached in Webstorm (The Debugger tab says "Connected to localhost:9666 - dist/src/main.js"). The problem is that no breakpoints are being hit. They are not marked with a "V" and are not being hit during execution.

Any ideas?

Using Webstorm 2021.1 on Windows 10.

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

There is something you need to set up in the debugger.

Take a look at the config, and there's something called Remote URLs of local files(optional). You need to specifiy the RemoteURL for your file/directory so it can hit the debugger.

sample config

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!