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

424
Vistas
VSCode, Docker, Rails debugging

New to VSCode i tried to debug an existing Rails app that Runs within Docker (started via docker compose)

I followed the instructions on https://github.com/rubyide/vscode-ruby (installed the gems + extension, launch config).

I can start puma and see breakpoints being added

some-app_1  | 1: <breakpointAdded no="3" location="...../some-app/app/controllers/hello_worlds_controller.rb:4"/>

But when I hit the above controller with a request, the breakpoint does not kick in (request just passes).

  • Ruby: 2.7
  • Rails: 6.1
  • cmd (docker-compose.yml): "rdebug-ide --debug --host 0.0.0.0 --port 1234 -- bin/rails server -p 5000 -b 0.0.0.0"

launch config:

{
    "version": "0.2.0",
    "configurations": [
      {
        "name": "some-App",
        "type": "Ruby",
        "request": "attach",
        "remoteHost": "127.0.0.1",
        "remotePort": "1234",
        "remoteWorkspaceRoot": "${workspaceRoot}",
        "cwd": "${workspaceRoot}",
      }
    ]
  }

There is nothing in the Ruby output channel or in the logs of the container.

I assume I am doing something wrong? Or something is missing?

over 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

It seems your remoteWorkspaceRoot it's pointing to your local machine, the debugger needs to know what file should he watch to break inside the docker container

For example, if inside your docker container, your project is on "/app", you should change your remoteWorkspaceRoot variable to "/app"

In console you should see

some-app_1  | 1: <breakpointAdded no="3" location="your-docker-path-to-the-project/some-app/app/controllers/hello_worlds_controller.rb:4"/>

instead of

some-app_1  | 1: <breakpointAdded no="3" location="...../some-app/app/controllers/hello_worlds_controller.rb:4"/>

and that should work fine if you are not using Windows (backlashes compatibility)

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