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.
Trying to run the ruby debugger in netbeans6.5 using ruby1.9.1 as the platform doesn't work First I got these errors C:/prog/ruby/bin/rdebug-ide:19:in `load': C:/prog/ruby/lib/ruby/gems/1.9.1/gems/ruby-debug-ide-0.3.3/bin/rdebug-ide:25: syntax error, unexpected '.', expecting '|' (SyntaxError) ...r remote debugging") {|options.host|} ... ^ C:/prog/ruby/lib/ruby/gems/1.9.1/gems/ruby-debug-ide-0.3.3/bin/rdebug-ide:26: syntax error, unexpected '.', expecting '|' ...r remote debugging") {|options.port|} ... ^ from C:/prog/ruby/bin/rdebug-ide:19:in `<main>' I monkey patched opts.on("-h", "--host HOST", "Host name used for remote debugging") {|options.host|} opts.on("-p", "--port PORT", Integer, "Port used for remote debugging") {|options.port|} to opts.on("-h", "--host HOST", "Host name used for remote debugging") {|x|options.host=x} opts.on("-p", "--port PORT", Integer, "Port used for remote debugging") {|x|options.port=x} That got rid of the syntax errors but now the IDE just waits for the debugger session when i run it from the command line i got a popup saying "This application has failed to start because msvcrt-ruby18.dll was not found" wich i guess means that there is no compiled version for 1.9 Here is a response from Martin Krauskopf " The bigger problem is that so far nobody probably tried ruby-debug-ide against Ruby 1.9, so this needs to be looked on. Moreover I think that also ruby-debug-base might not be ready for Ruby 1.9.... I've just noticed that linecache module cannot be compiled against 1.9. So likely the whole ruby-debugging backend is not ready for 1.9 so far, since dependencies are: ruby-debug ---------+ | v ruby-debug-ide -> ruby-debug-base -> linecache "
Setting TM to 7.0 for now. Depends on the backend really as described in Martin's diagram.
Any plan for 6.7? I'm asked from community folk about the status for 1.9.1 and debugger support.
This really depends on ruby-debug-base at this point, once it is ready for 1.9.x we can proceed on the IDE side. We haven't had anyone from NB contributing to ruby-debug-base and for 6.7 there isn't enough time to become familiar enough with it to be able to help make it work with 1.9.1.
Setting TM to 6.8, but as written before depends on ruby-debug-base.
ruby-debug-base has been ported to Ruby 1.9. See http://github.com/mark-moseley
I've exchanged few emails yesterday with Mark and we will make it possible for Mark's (and possibly similar) fork to work with NetBeans. - Mark will ensure correct version in the fork which fits API compatibility - I'll provide possibility to pass property for alternative ruby-debug-ide name I've already made it work locally on my machine (seems to work nicely Mark). There is also other tweak needed in ruby-debug-ide wrt. to 1.9.x, I'll ping you about exactly what Mark, you will need to do the same in your fork. Otherwise this is really not NetBeans issue - fix is needed on lower layers (debug-commons, ruby-debug projects). Changing subject to reflect what is actually needed on NB side. Will push either today or after (offline) weekend.
I've pushed the NetBeans part: #79aa0d4f8a16 And ruby-debug-ide part: http://rubyforge.org/pipermail/debug-commons-commits/2009-August/000356.html Mark you need to update your ruby-debug-ide fork accordingly to the above commit (if localhost is used, there is some weird problem wrt. to the connecting from Java client to Ruby server - as it is with MacOS - the workaround seems to work). Once you fix the version to the mentioned pattern (e.g. 0.4.7.1mm, 0.4.7, ... 0.4.x) and start NetBeans with -J-DrubyDebugIDEName=mark-moseley-ruby-debug-ide parameter, the debugger should work. Let me know if you hit some problems or have any questions.
Integrated into 'main-golden', will be available in build *200908211401* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/79aa0d4f8a16 User: Martin Krauskopf <mkrauskopf@netbeans.org> Log: #157870: Possibility to pass alternative ruby-debug-ide gem's name
The "localhost" fix works for me on Windows XP, but not on Vista x64. "127.0.0.1" does work on Vista x64.
Mark could you find out how RUBY_PLATFORM constant differs on Vista vs. XP and/or provide a patch for lib/ruby-debug.rb:122 (just tweaking condition). Thanks.
Strange. 1.8.7, i686-linux, 'localhost' combination does not work either. '127.0.0.1', nil, '' all works. I would bet that half a year ago it worked on Ubuntu in the currently non-working configuration. Some of the mentioned component could be a bit different. Seems to be quite unpredictable.
Mark, could you try on your XP and Vista, whether just: server = host ? TCPServer.new(host, port) : TCPServer.new(port) works. Instead of the odd condition, i.e. patch: Index: ruby-debug.rb =================================================================== --- ruby-debug.rb (revision 637) +++ ruby-debug.rb (working copy) @@ -119,12 +119,8 @@ return if @control_thread @control_thread = DebugThread.new do begin - unless RUBY_PLATFORM =~ /darwin/i or # Mac OS X seems to have problem with 'localhost' - RUBY_VERSION =~ /1\.9\../ # Ruby 1.9.x seems to as well - host ||= 'localhost' # nil does not seem to work for IPv6, localhost does - end $stderr.printf "Fast Debugger (ruby-debug-ide 0.4.7) listens on #{host}:#{port}\n" - server = TCPServer.new(host, port) + server = host ? TCPServer.new(host, port) : TCPServer.new(port) while (session = server.accept) begin interface = RemoteInterface.new(session)
That works on XP but still not Vista. Note that another variable here is IPv6. My XP box doesn't have it, but my Vista box does. "ping localhost" on my XP pings "127.0.0.1", and on my Vista pings "::1:".
Mark, I've sent you .jar to try. I've problem with sending the email to your personal address (returned with server failure), so I've send it to your @netbeans.org one. If it does not come, let me know if there is other way to contact you. Thanks. On the Java side I'm using: new Socket(InetAddress.getLocalHost(), port); And on the Ruby side: TCPServer.new(port) which I believe is correct combo. PS: I'll try your new gems (mentioned in personal email) as well (for the case you did not get my mail message)
Update for Mark: I've pushed one more change which makes NetBeans work with ruby-debug-ide19 automatically when running on 1.9. I've also tried both configuration and both seems to work. So no need for -J-D<property> from user's side. I'm a bit reluctant to provide ruby-debug-ide19 gem on debug-commons project, let's communicate through email the details. Changeset: #d4abfc9e7a60