问题
I have a JRuby on Rails application running on Tomcat 7 server. I use Eclipse as IDE. Is there a way to trigger breakpoints in the Ruby code?
If not, is there any other way to debug the application? (and I rather not use messages be printed to the console). I suppose that if it doesn't work with Eclpse, it won't work with IntelliJ either.
回答1:
The JRuby on Rails application that we are currently developing will ultimately be deployed to a Tomcat server. During development, however, we use the out-of-the-box WEBrick server to run and debug our application. Although, we use IntelliJ (with the Ruby plugin) so I'm not sure if there is similar support for Rails development in Eclipse. You could always switch to IntelliJ...
Note: With this approach you would still want to frequently deploy to Tomcat, perhaps within a staging environment, or as part of a continuous deployment strategy. This will ensure the application still behaves as expected when deployed to Tomcat and that any nuances can be caught early.
来源:https://stackoverflow.com/questions/8337804/is-there-a-way-to-debug-a-jruby-on-rails-application-running-on-a-tomcat-server