Newbie question: RubyMine to remote debug SketchUp Ruby API?

Hi folks,

did anyone of you succeed in using RubyMine to debug Ruby-scripts inside of Google's/Trimble's SketchUp?

-The description given at states that SketchUp's Ruby API Debugger also works with RubyMine's IDE, but I can't make it work.

My setup is as follows:
- I have SketchUp2014, together with the SURubyDebugger.dll on a Windows 8.1 PC
- I startup SketchUp as described: "SketchUp.exe" -rdebug "ide port=1234"
- now SketchUp sits there and is not responsive -that's for sure, as it waits for an IDE to connect to the stated port 1234. If I do so with Aptana Studio 3 and its remote debugging capabilities, that both do find each others and I can go into SketchUp's "Ruby Console" to load a script

However in RubyMine (I'm still on 6.0), all that doesn't work, but I'm pretty sure it is just for my lack of understanding / lack of precision of the online help how to do it?:

I made a little test-script, named C:\Users\kr\RubymineProjects\testSU\testSU.rb, and consisting just of two lines of simple Ruby code:

puts "Hello World!"

Sketchup.active_model.entities.add_line [0,0,0], [9,9,9]

Now in RubyMine, I made under "Run" -> "Edit configurations" -> "Defaults" -> "Ruby Remote debugging" the following entries as shown in the attached JPG file testSU.jpg:

  • Remote host = localhost   (as SketchUp and RubyMine are sitting both on the same PC)
  • Remote port = Local port = 1234  (as this is the only port I can use in the SketchUp command line)
  • Remote root folder = Local root folder = C:\Users\kr\RubymineProjects\testSU\   (as this is the folder where the testSU.rb file is sitting in)

Is this correct? (The info stated at  doesn't really help on SketchUp): How do I start the connection now? I'd normally expect that I a) first could invoke RubyMine's debug session in that afterwards, I would be able to "unfreeze" SketchUp this way & load the script within its "Ruby console" window, which would trigger SketchUp to start processing the script. But obviously, that's not the way it works..

Any hints welcome!

Comment actions Permalink


I have never tried to debug ScetchUp but there is a least one problem with your remote debug configuration:
you have specified the same port for remote/local ports but they must be different.
Remote port is one we connect to, local port is used by debugger to report that new sub-process has been created.


Comment actions Permalink

Hi Oleg,

thanks for your reply. If one invokes SketchUp in remote debug mode, it looks like this:

SketchUp.exe -rdebug "ide port=1234"

That is: You can state only one port?

Comment actions Permalink


bitbuerster wrote:

thanks for your reply. If one invokes SketchUp in remote debug mode, it looks like this:

SketchUp.exe -rdebug "ide port=1234"

That is: You can state only one port?

yes, and the port is what we call "remote port" in the run configuration.  Local port is not used by SketchUp, but you have to specify one and it should be different from the remote one (in you case) because we will start our debug server which will listen on it.

So, debugger will connect to <host>:<remote port> you have specied in the run configuration (in your case it is localhost:1234)
and listen special (optional) commands on localhost:<local-port>.  And if you specify 1234 for both local and remote ports you will have a colision :(
Thus you need to specify different port for local port even though SketchUp doesn't use it.

Hope I've clarified the situation.

Regards, Oleg.


Please sign in to leave a comment.