This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
This enhancement is to support for debugging Rails applications when running on GlassFish V3.
There are (at least) 3 ways the V3 server can be run right now 1. Installed and managed by the serverplugin, then launched by either the serverplugin or asadmin at a command prompt. 2. Install the GEM and the RailsProject code that manages server gems will handle it 3. Install the server as in (1) and then launch a simple Grizzly + JRuby process using com.sun.grizzly.standalone.JRuby as the entry point. Debug-commons, the library used by the NetBeans ruby debugger for starting and communicating with the rdebug-ide/ruby-debug script does not allow attachment or delegation of launching debug tasks, so supporting Rails debugging in (1) is not possible right now. The Glassfish GEM works by running a startup script that launches the server via the launcher code, so debugging isn't supported there for reasons similar to (1), although you can debug the startup script (weird fact for the day). If the GlassFish GEM used the standard server entry point (script/server) for launching rails, it might work. Unclear if this could be supported due to how Grizzly works though and that startup mode is not supported right now. That leaves option (3) as the only viable short term alternative. Debug-commons startDebugger api is currently too restrictive to allow launching of a java process, so first, we need a patch to allow a more flexible debuggee launching procedure.
Created attachment 65301 [details] Patch providing a new entry point for starting ruby debug tasks
Created attachment 65469 [details] Patch enabling rdebug in V3 inside the grizzly-jruby adapter
Attached is the patch for V3's grizzly-jruby adapter that, if the follow properties are set, activates rdebug on the JRuby runtime managed by this adapter glassfish.rdebug=<absolute path of rdebug script> glassfish.rdebug.port=<port used by rdebug> (mandatory) glassfish.rdebug.version=<version of rdebug> (optional) glassfish.rdebug.iosynch=<absolute path to io synchronization script> (optional) glassfish.rdebug.verbose=true enables rdebug diagnostics
Changesets for V3/JRuby debugging in NetBeans: http://hg.netbeans.org/main/rev/faf78f72d6e7 http://hg.netbeans.org/main/rev/790535b65ef2
This feature is now implemented. In order to test it, you need a V3 server build containing the attached RubyObjectPool patch. Such a build is available here for now: http://javaweb.sfbay/~peterw99/glassfish/web_jrubydebug_patch.zip There is also a P2 bug that you'll hit immediately if you try to use breakpoints and step through user code -- see http://www.netbeans.org/issues/show_bug.cgi?id=141462 You can step through the rails startup code though (start in config/environment.rb). Marking fixed.