I have IDEA 12 and cannot properly use debugger in Rails/Ruby [a similar question is this one Idea 11 breakpoints & ruby]. When I pressed DEBUG the first time on a rails/ruby app it correctly installed the ruby-debug-base19x and ruby-debug-ide. Issuing a gem list | grep debug
shows these gems:
debugger-ruby_core_source (1.2.2)
ruby-debug-base19x (0.11.30.pre12)
ruby-debug-ide (0.4.17.beta16)
The debug [local debug] is starting successfully and I have this in the console:
/home/user/.rvm/rubies/ruby-1.9.3-p194/bin/ruby -e at_exit{sleep(1)};$stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift) /home/user/.rvm/gems/ruby-1.9.3-p194/gems/ruby-debug-ide-0.4.17.beta16/bin/rdebug-ide --port 55940 --dispatcher-port 37293 -- /home/user/work/IdeaProjects/rails/xtrade/script/rails server -b 0.0.0.0 -p 3000 -e development
Fast Debugger (ruby-debug-ide 0.4.17.beta16, ruby-debug-base19x 0.11.30.pre12) listens on 127.0.0.1:55940
=> Booting WEBrick
=> Rails 3.2.11 application starting in development on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
[2013-06-26 20:53:32] INFO WEBrick 1.3.1
[2013-06-26 20:53:32] INFO ruby 1.9.3 (2012-04-20) [x86_64-linux]
[2013-06-26 20:53:32] INFO WEBrick::HTTPServer#start: pid=32688 port=3000
The only thing is that the breakpoints are never hit. I tried to put breakpoints in Controllers and Views but nothing changed. I tried plenty of times to install uninstall gems but I never managed to have the debugger working in Rails/Ruby. Tried also with the remote debugging but nothing as well.
Ctrl + F8 (Mac: Cmd + F8) Toggle breakpoint.
Terminate a debugger sessionClick the Stop button in the Debug tool window. Alternatively, press Ctrl+F2 and select the process to terminate (if there are two or more of them).
The problems was due a usage of a symlink in the project structure [see also this Symlinks confuse debugger for related issue happening in the debugger in Rubymine]
By removing the symlink and using the full path to the files, it fixed the debugger and now Idea12 is stopping correctly in Ruby / Rails code.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With