Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

630
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda