-
Notifications
You must be signed in to change notification settings - Fork 83
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rails server hangs, doesn't stop at breakpoints #208
Comments
Hitting the same problem with VS Code recently. Just a couple days. |
My environment is: Puma 4.2.0, Rails 5.0, 5.1, 5.2 |
No. Arch Linux.
Are you actually staying on-topic? This is an issue about Rails server hanging when the code is about to hit the breakpoint. (Browsing to a location that would not break will not hang the server) If this is offtopic, please create a new ticket, and preferably submit a PR since you seem to have a solution to the issue you are facing. |
I missed the topic then, sorry, I'm removing the comment |
In case this is a question of environment, this was on Pop OS, an Ubuntu based distro geared toward dev work. I haven't tested this on any other OS. |
I wonder if this issue is due to puma running in cluster mode versus single mode? Setting |
I have three problematic scenarios, and all are preventing me from properly debugging the server using VSCode and Docker.
Scenario 1:
I start the server in the container using
rdebug-ide --host 0.0.0.0 --port 6969 --dispatcher-port 6969 -- bin/rails s -p 3000 -b 0.0.0.0
When I attach the IDE, the server starts normally. When I try to make a request, it hangs and doesn't reach the breakpoint in VSCode. Eventually the console will print timeout messages:
Scenario 2:
I start the server without the dispatcher port using
rdebug-ide --host 0.0.0.0 --port 6969 -- bin/rails s -p 3000 -b 0.0.0.0
I attach the IDE and the server then operates normally when it receives requests, but will not stop on VSCode breakpoints.
Scenario 3:
I use docker-compose to start the container using the configuration:
The server operates normally, and hangs for the requests where breakpoints are set, but breakpoints aren't reached in VSCode.
I see people using the same port as configured in the launch.json for the dispatcher port, and I also see them using 26162, which seems like a VSCode-internal debugging port. Which one should be used? Any other ideas what's wrong with my configuration?
The text was updated successfully, but these errors were encountered: