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

Do not step into gems, only debug my code #181

Open nabheet opened 4 years ago

nabheet commented 4 years ago

I have searched quite a bit and haven't been able to find an answer to this question. I apologize if this is really basic, my google-fu is not strong enough to find this information.

Lets say the gems used by our application are installed in /usr/locaI/bundle. I was wondering if there was a way to prevent the debugger from stepping into files in that directory. In other words, is it possible to force the debugger to only step into files that are in my workspace and continue or step over the code that is in gems in a different directory.

In case it helps, I am using VS Code and have been able to attach to the debugger. During my debug attemps, I have ended up in files for rspec and rails in the bundle directory which has cause some confusion during my debugging attempts. So was hoping that if directories could be excluded or forcibly included, it would solve my problem.

ViugiNick commented 4 years ago

@nabheet It's better to ask for this feature in VSCode ruby-plugin tracker since ruby-debug-ide protocol already allows to perform stepping the way you ask

nabheet commented 4 years ago

Ok thank you! I will ask them.

nabheet commented 4 years ago

Can you please point me to the location/documentation on how the ruby-debug-ide protocols allows this feature? maybe I can ask better questions if I can understand how things are supposed to work.

ViugiNick commented 4 years ago

@nabheet https://github.com/ruby-debug/ruby-debug-ide/commit/5e3b6684bf80da086740ba8d97ca95f1c02e9553

breathe commented 4 years ago

@ViugiNick is the opposite of this possible ...? I would like to be able to see the source code of gems I use in breakpoints -- but it always shows as "Unknown source" ...

image
TSMMark commented 3 years ago

Mine always shows as "Unknown source" as well. The ruby process is in docker, while VS code is running on the host Mac, if that's related.

Any way to basically "sourcemap" the files to point to the open files in the current workspace in vs code?

mslinn commented 2 years ago

This is an issue for me as well.