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

421
Views
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 answers
Answer question

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 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!