I'm trying to figure out how to debug threaded web apps in ruby.
The gist below contains a much simplified and trivial app that mirrors the problem I'm having with my project app. I run the application using foreman start and then I try to debug it with a byebug statement in myapp.rb. When I go to the root url in a browser it hits the break point, but doesn't yield control to me in the console, I can't do anything at all. It just shows the breakpoint but I can't type anything into the console, so I can't navigate to other breakpoints etc...
What am I doing wrong?
**Procfile**
web: bundle exec puma -C ./config/puma.rb
**config.ru**
require_relative 'myapp'
run Sinatra::Application
**myapp.rb**
require 'sinatra'
require 'byebug'
get '/' do
message="oh, hello!"
byebug
message
end
**puma.rb**
workers 2
threads_count = 5
threads threads_count, threads_count