ruby-debug / ruby-debug-ide

An interface which glues ruby-debug to IDEs like Eclipse (RDT), NetBeans and RubyMine.
https://www.jetbrains.com/ruby/features/ruby_debugger.html
Other
370 stars 83 forks source link

Only able to debug the first request that causes the debugger to break with rails server ...? #180

Closed breathe closed 4 years ago

breathe commented 4 years ago

I'm using rdebug-ide to debug a rails 4.2.8 application.

I launch rdebug-ide like this -- explicitly setting WEB_CONCURRENCY=0 which prevents the puma server from running in multi-process mode:

env  NEW_RELIC_AGENT_ENABLED=false WEB_CONCURRENCY=0 ENABLE_DYNO_DEBUG=true rdebug-ide --host 127.0.0.1 --port 9897 -- bin/rails server --port 5000

I'm able to attach the VSCode debugger to the process on port 9897. I set a breakpoint, send an http request to port 5000, hit the breakpoint and debug the request as expected. I step through a few lines, inspect some state, and then press press play to continue and the debugger is no longer paused.

But after that point -- the server is never again able to respond to requests. I have to disconnect the debugger (which kills the server process) and relaunch it to get again into a debuggable state -- I'm then able to debug only one request just like before.

This repro's 100% of the time for me. Does this happen for others? Is there anything I can look at changing in my project to make this work the way I want?

ViugiNick commented 4 years ago

@breathe Could you please specify ruby-debug-ide/debase versions you are using?

ViugiNick commented 4 years ago

@breathe Looks like thats a problem on the VSCode ruby-plugin side

breathe commented 4 years ago

Hi @ViugiNick - incredibly sorry for the slow response - I missed the github notifications.

I'm super interested in supply in any information I can to help address this and am following this thread now so I won't take so long to respond in future ...!

Could you please specify ruby-debug-ide/debase versions you are using?

ruby-debug-ide (0.7.0)
debase (0.2.3)
debase-ruby_core_source (>= 0.10.2)
debase-ruby_core_source (0.10.5)

Looks like thats a problem on the VSCode ruby-plugin side

Any idea what I might issue I might report to them to help get it fixed ...?

Many thanks!

ViugiNick commented 4 years ago

@breathe Looks like there are some issues with handling multiprocess applications(and several debugger connections)

breathe commented 4 years ago

@ViugiNick I launch the rails application with WEB_CONCURRENCY=0 which causes the server to not be multi-process (AFAIK) ...?

breathe commented 4 years ago

@ViugiNick Upgrading to latest debase (0.2.4.1) (from 0.2.3) fixed my issue!!!! I AM SO VERY HAPPY!!!!!!!