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

How to start the debugger from Ruby? (Also: How to set a breakpoint in HAML?) #234

Closed ndbroadbent closed 1 year ago

ndbroadbent commented 1 year ago

Hello,

Sorry if this is the wrong place to post a question, but I couldn't figure out how to set a breakpoint and start a debugging session directly from the Ruby process. I'm trying to set a breakpoint in a HAML file (a Rails view with the html.haml extension.) I couldn't click on a line in the sidebar, so I thought I would try to call - debugger, but this method is not registered.

Is there a Ruby method I can call that will pause execution and start a debugging session in VS Code? Thanks!

Related question on StackOverflow for HAML: https://stackoverflow.com/questions/65095007/debugging-haml-files-within-vscode

hurricup commented 1 year ago

Looks like it's more a question to HAML support in vscode. Debugger can set such breakpoint, works in RubyMine for example for erb for sure and haml irr. Debugger was not designed for manual breakpoints setting.

ndbroadbent commented 1 year ago

Hi @hurricup, thanks for your reply!

Debugger was not designed for manual breakpoints setting.

Ahh I see, that makes sense. In that case I might move this discussion to the "Better HAML" extension and see if I can help them add support