I am on this quest to get Netbeans IDE working with SU Ruby. The development version of Netbeans has a capability to attach a debugger to a Ruby process. See link below:
http://blogs.sun.com/martink/entry/remo ... tever_ruby
This works awesome on regular Ruby programs. So I thought I would muddle my way through trying to get it to work with SU Ruby. I have a regular ruby 1.8.6 install. Steps so far:
1. Created init.rb and put it in plugins dir. This is a one line Ruby program to add a regular Ruby install paths to the SU loadpath.
2. Made sure I have the latest rubygems and rdebug-ide. Copied over the c:\ruby\bin\rdebug-ide to ..\plugins\debug\rdebug-ide.rb
3. Started SU Ruby console and did a require 'debug/rdebug-ide'. Got this error
Error: #<NoMethodError: undefined method `sync=' for #<Sketchup::Console:0x342ed90>>
C:/Program Files/Google/Google SketchUp 7/Plugins/debug/rdebug-ide.rb:19:in `load'
C:/Program Files/Google/Google SketchUp 7/Plugins/debug/rdebug-ide.rb:19
If I look at loadpath it seems to contain all the required paths. Any ideas on how to get this working.
["C:/Program Files/Google/Google SketchUp 7/Plugins", "C:/Program Files/Google/Google SketchUp 7/Tools", ".", "c:/ruby/lib/ruby/gems/1.8/gems/linecache-0.43-x86-mswin32/bin", "c:/ruby/lib/ruby/gems/1.8/gems/linecache-0.43-x86-mswin32/lib", "c:/ruby/lib/ruby/gems/1.8/gems/ruby-debug-base-0.10.3-x86-mswin32/bin", "c:/ruby/lib/ruby/gems/1.8/gems/ruby-debug-base-0.10.3-x86-mswin32/lib", "c:/ruby/lib/ruby/gems/1.8/gems/ruby-debug-ide-0.4.5/bin", "c:/ruby/lib/ruby/gems/1.8/gems/ruby-debug-ide-0.4.5/lib", "c:/ruby/lib/ruby/site_ruby/1.8", "c:/ruby/lib/ruby/site_ruby/1.8/i386-msvcrt", "c:/ruby/lib/ruby/site_ruby", "c:/ruby/lib/ruby/1.8", "c:/ruby/lib/ruby/1.8/i386-mswin32"]
2 posts • Page 1 of 1
From a quick reading, it looks like this is an ide to attach to a Ruby script run from the command line.
SketchUp, however, runs scripts from an embedded version of Ruby. Not the command line. So there's no port or process to attach to.
Secondly, running the rudebug-ide would not give you access to the SketchUp Ruby extensions embedded inside SketchUp. Eg., If you issue a UI.messagebox() call (or any SketchUp call) from your script loaded by rdebug-ide, it'll just get an "unknown method" error.
Third, the SketchUp Console is in control of all Standard in, out, and err I/O streams. Ruby-ide will have to redirect the SketchUp Console I/O to itself, then restore them when it's finished.
For MS windows, an alternative might be:
SketchUcation Community Forums • View topic - [plugin] SuRDebug
2 posts • Page 1 of 1