Thanks very much for the reply. It seems that in Run->Edit Configurations I can only specify a Torquebox server for either Rail or Rack configs. What if I have a Sinatra app, or just a plain Ruby app I want to run in Torquebox? I have been trying a Bash-based launch approach to start torquebox that way, but the breakpoints don't hit (unsurprisingly).
Fast Debugger (ruby-debug-ide 0.4.23.beta1, ruby-debug-base 0.10.5.rc9) listens on 127.0.0.1:52757
launching...
/Users/user_dir/.gem/jruby/1.9/gems/ruby-debug-base-0.10.5.rc9-java/lib/ruby-debug-base.rb:210 warning: tracing (e.g. set_trace_func) will not capture all events without --debug flag
Fast Debugger (ruby-debug-ide 0.4.23.beta1, ruby-debug-base 0.10.5.rc9) listens on 127.0.0.1:52764
Booting AS7 from configuration /Users/user_dir/torquebox-3.1.1/jboss/standalone/configuration/standalone.xml
Listening for transport dt_socket at address: 8787
11:37:02,452 INFO [org.jboss.modules] (main) JBoss Modules version 1.2.0.CR1
11:37:02,653 INFO [org.jboss.msc] (main) JBoss MSC version 1.0.4.GA
11:37:03,098 INFO [org.torquebox.bootstrap] (ServerService Thread Pool -- 4) Bootstrapping TorqueBox
11:37:03,099 INFO [org.torquebox.bootstrap] (ServerService Thread Pool -- 4) Bootstrapping TorqueBox with a JRuby home of /Users/user_dir/torquebox-3.1.1/jruby
11:37:03,346 INFO [org.torquebox.web.as] (ServerService Thread Pool -- 20) Initializing TorqueBox Web Subsystem
11:37:03,349 INFO [org.torquebox.stomp.as] (ServerService Thread Pool -- 19) Initializing TorqueBox STOMP Subsystem
11:37:03,350 INFO [org.torquebox.services.as] (ServerService Thread Pool -- 18) Initializing TorqueBox Services Subsystem
11:37:03,351 INFO [org.torquebox.security.as] (ServerService Thread Pool -- 17) Initializing TorqueBox Auth Subsystem
11:37:03,353 INFO [org.torquebox.jobs.as] (ServerService Thread Pool -- 15) Initializing TorqueBox Jobs Subsystem
09:00:54,572 INFO [org.jboss.modules] (main) JBoss Modules version 1.2.0.CR1
09:00:54,927 INFO [org.jboss.msc] (main) JBoss MSC version 1.0.4.GA
09:00:55,446 INFO [org.torquebox.bootstrap] (ServerService Thread Pool -- 10) Bootstrapping TorqueBox
09:00:55,449 INFO [org.torquebox.bootstrap] (ServerService Thread Pool -- 10) Bootstrapping TorqueBox with a JRuby home of /Users/user/torquebox-3.1.1/jruby
09:00:55,801 INFO [org.torquebox.core.as] (ServerService Thread Pool -- 6) Initializing TorqueBox Core Subsystem
09:00:55,808 INFO [org.torquebox.security.as] (ServerService Thread Pool -- 11) Initializing TorqueBox Auth Subsystem
09:00:55,808 INFO [org.torquebox.core.as] (ServerService Thread Pool -- 6) Welcome to TorqueBox AS - http://torquebox.org/
Guessing this is releated to my issue ...
09:51:20,459 ERROR [stderr] (pool-3-thread-2) /Users/user/.gem/jruby/1.9/gems/ruby-debug-base-0.10.5.rc9-java/lib/ruby-debug-base.rb:210 warning: tracing (e.g. set_trace_func) will not capture all events without --debug flag
09:51:20,467 ERROR [stderr] (Ruby-1-Thread-83: /Users/user/.gem/jruby/1.9/gems/ruby-debug-ide-0.4.23.beta1/lib/ruby-debug-ide.rb:103) Fast Debugger (ruby-debug-ide 0.4.23.beta1, ruby-debug-base 0.10.5.rc9) listens on 127.0.0.1:50753
09:51:20,476 ERROR [stderr] (Ruby-1-Thread-83: /Users/user/.gem/jruby/1.9/gems/ruby-debug-ide-0.4.23.beta1/lib/ruby-debug-ide.rb:103) 1477: Ide process dispatcher notified about sub-debugger which listens on 50753
Well, I'd try to pass --debug to torwuebox and if this will not help feel free to file a ticket in our tracker (https://youtrack.jetbrains.com/issues/RUBY) but please provide a simple project to reproduce the problem.
Hi,
it is possible, please check https://www.jetbrains.com/ruby/webhelp/run-debug-configuration-rails.html
Hope this helps, Oleg.
Thanks very much for the reply. It seems that in Run->Edit Configurations I can only specify a Torquebox server for either Rail or Rack configs. What if I have a Sinatra app, or just a plain Ruby app I want to run in Torquebox? I have been trying a Bash-based launch approach to start torquebox that way, but the breakpoints don't hit (unsurprisingly).
Hi,
please show your run configuration.
Also make sure you have added required debugging gems to you Gmefile.
Regards, Oleg.
Well, for the bash-launch approach (very much clutching at straws here...) :
Script Name: /<path>/ruby_app/launch.sh
Bash Interpreter: /bin/bash
Environment Variables:
JBOSS_OPTS=-Djruby.home=<path>/torquebox-3.1.1/jruby --server-config=standalone-ha.xml --debug
Gemfile:
gem 'ruby-debug-base', '>= 0.10.5.rc3'
gem 'ruby-debug-ide', '>= 0.4.17.beta14'
launch.sh
export RACK_ROOT=`pwd`
torquebox run
You need to create Ruby script run configuration instead of bash run configuration.
This way it should work.
Regards, Oleg.
Ok thanks. Tried it with system and spawn calls but it doesn't attach:
#!/usr/bin/env ruby
system('torquebox run')
#spawn('torquebox run')
Perhaps I'm missing somthing but why you can not use torquebox as a ruby script to debug?
Regards, Oleg.
Thanks good idea - I have done that but breakpoints still not being hit.
Guessing this is releated to my issue ...
Well, I'd try to pass --debug to torwuebox and if this will not help feel free to file a ticket in our tracker (https://youtrack.jetbrains.com/issues/RUBY)
but please provide a simple project to reproduce the problem.
Regards, Oleg.
Ok I will do thanks.