How to get a ruby ​​debugger to work with shotgun sinatra?

Is there a way to run a shotgun to run ruby ​​debugger statements? the -d flag seems to be for debug output only.

+4
source share
2 answers

To find the best way to debug a synatra application, I created a repo on github. The most useful part is the step into the debug method, which looks below.

enter image description here

Here is the repo: https://github.com/hlee/sinatra_debugger_example

I also confirmed that this example supports shotguns. try as below

 cd sinatra_debugger_example bundle shotgun config.ru 

and visit: http://localhost:9393 , you can use debugging and stepping pry.

About the debugger and pry:

  • The sample project supports both debugger and pry.
  • I personally understand better.

Hope this helps you.

+3
source
0
source

Source: https://habr.com/ru/post/1385132/


All Articles