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.

Bug 125392 - Ruby debugging doesn't work with JRuby 1.1
Summary: Ruby debugging doesn't work with JRuby 1.1
Status: VERIFIED FIXED
Alias: None
Product: ruby
Classification: Unclassified
Component: Debugger (show other bugs)
Version: 6.x
Hardware: All All
: P1 blocker (vote)
Assignee: Martin Krauskopf
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-01-16 15:15 UTC by Jiri Skrivanek
Modified: 2008-01-21 17:43 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jiri Skrivanek 2008-01-16 15:15:13 UTC
Debugging in ruby application doesn't work. To reproduce:

- create Ruby project
- toggle breakpoint at "puts..." in main.rb
- start debugger but it shows warning dialog after 15 seconds: "Problem occured during debugger start: Unable to read
added breakpoint number in the specified timeout [15s]".

Product Version: NetBeans IDE Dev (Build 20080116062005)
Java: 1.6.0_04; Java HotSpot(TM) Client VM 10.0-b19
System: Windows XP version 5.1 running on x86; Cp1250; cs_CZ (nb)
Comment 1 Martin Krauskopf 2008-01-16 15:35:36 UTC
Very likely due to JRuby 1.1 RC1. I assume we have to pass some switches unless there is some bug in the interpreter
itself. I've lost the track a little bit.
It does work with native Ruby.
Comment 2 Martin Krauskopf 2008-01-17 20:05:54 UTC
Fixed.

Changes in debug-commons-java:
  * RubyDebuggerFactory#Descriptor.setJRuby(). Possibility for a client to say
    that interpreter is JRuby. If yes, appropriate flags to 'enable' debugging
    are set"

debugger/src/org/netbeans/modules/ruby/debugger/RubyDebugger.java 
debug-commons-java/external/debug-commons-java-0.8.1.jar;
new revision: 1.6; previous revision: 1.5
debugger/src/org/netbeans/modules/ruby/debugger/RubyDebugger.java;
new revision: 1.21; previous revision: 1.20

Comment 3 Jiri Skrivanek 2008-01-18 08:31:26 UTC
Now it works for JRuby but doesn't work for native ruby

INFO [org.rubyforge.debugcommons.Util]: Standard Output:
ruby 1.8.6 (2007-09-24 patchlevel 111) [i386-mswin32]
SEVERE [org.rubyforge.debugcommons.Util]: Error Output:
d:/Development/Ruby/ruby-1.8.6-dist/lib/ruby/gems/1.8/gems/ruby-debug-ide-0.1.9/
lib/ruby-debug.rb:13: warning: method redefined; discarding old interrupt
d:/Development/Ruby/ruby-1.8.6-dist/lib/ruby/gems/1.8/gems/ruby-debug-ide-0.1.9/
lib/ruby-debug.rb:23: warning: method redefined; discarding old at_breakpoint
d:/Development/Ruby/ruby-1.8.6-dist/lib/ruby/gems/1.8/gems/ruby-debug-ide-0.1.9/
lib/ruby-debug.rb:27: warning: method redefined; discarding old at_catchpoint
d:/Development/Ruby/ruby-1.8.6-dist/lib/ruby/gems/1.8/gems/ruby-debug-ide-0.1.9/
lib/ruby-debug.rb:31: warning: method redefined; discarding old at_tracing
d:/Development/Ruby/ruby-1.8.6-dist/lib/ruby/gems/1.8/gems/ruby-debug-ide-0.1.9/
lib/ruby-debug.rb:35: warning: method redefined; discarding old at_line
d:/Development/Ruby/ruby-1.8.6-dist/lib/ruby/gems/1.8/gems/ruby-debug-ide-0.1.9/
lib/ruby-debug.rb:47: warning: method redefined; discarding old interrupt
d:/Development/Ruby/ruby-1.8.6-dist/lib/ruby/gems/1.8/gems/ruby-debug-ide-0.1.9/
lib/ruby-debug.rb:54: warning: method redefined; discarding old interrupt_last
d:/Development/Ruby/ruby-1.8.6-dist/lib/ruby/gems/1.8/gems/ruby-debug-ide-0.1.9/
lib/ruby-debug.rb:90: warning: instance variable @control_thread not initialized
Comment 4 Martin Krauskopf 2008-01-18 09:29:31 UTC
I've just put more tweaks. Note that you need to have exact version 0.9.3 (base), 0.1.9 (ide). All to be tuned properly
after 6.1M. Let me know if it still does not work.

debugger/src/org/netbeans/modules/ruby/debugger/RubyDebugger.java;
new revision: 1.23; previous revision: 1.22
platform/src/org/netbeans/modules/ruby/platform/gems/GemManager.java;
new revision: 1.13; previous revision: 1.12
Comment 5 Jiri Skrivanek 2008-01-21 17:43:46 UTC
Verified.