How do I configure ruby to enter the debugger on Ctrl-C (SIGINT)?
I'd like to enter the debugger upon typing ctrl-C (or sending a SIGINT). I have installed the debugger (I'm running Ruby 1.9.3) and verified that it works. I've added this to my setup files (this is for Padrino, but I assume it would be similar for Rails): # file: config/boot.rb Padrino.before_load do trap("SIGINT") { debugger } if Padrino.env == :development end ... but typing Ctrl-C does not invoke the debugger. In fact, if I replace debugger with puts "saw an interrupt!" , typing Ctrl-C doesn't cause a print to happen either. update Following this suggestion from Mike Dunlavey , I tried