4

Is there a way of running shotgun to allow for ruby debugger statements to run? the -d flag seems to be just for debugging output.

zlog
  • 3,316
  • 4
  • 42
  • 82

1 Answers1

3

In order to find the best way to debug sinatra app, I created a repo at github. The most useful part is step into method debug, which looks like below.

enter image description here

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

I also confirmed this example support shotgun as well. try as below

cd sinatra_debugger_example
bundle
shotgun config.ru

and visit: http://localhost:9393, you will be able to use pry debug and stepping.

About debugger & pry:

  1. the example project support both debugger and pry.
  2. I personally perfer pry better.

I hope it helps you.

Race
  • 923
  • 10
  • 14