Please help me to setup debugger on RubyMine for Mac


#1

I try to setup the ruby debugger on RubyMine for Mac. On github are the workflows for netbeans and for an other program but not for RubyMine although you mentioned it’s tested on RubyMine.


Sketchup Ruby Debugging with RubyMine
#2

And this zip contains the SketchUp 2014 Debug.vbs script I use to launch SketchUp.
SketchUp 2014 Debug.zip (289 Bytes)


Rubymine debug error SketchUp Pro 2018
#3

Where should het Remote root folder and the local root folders pointing to?


#4

The plugins folder - see the second screenshot.


#5

The path on the screenshot was not fully complete. Should the code to debug also be in the plugin folder?


#6

What code is that? The VBS? That can be anywhere - just give the full path to it.


#7

I’m sorry I mean the ruby code you want to debug.


#8

From wherever you want. I keep my extensions that I develop in separate folders under source control which I add to $LOAD_PATH. I open those in RubyMine and set my breakpoints and everything is shiny.

(We should be adding a complete guide for RubyMine as well. I just quickly tried to assemble some quick tip for now.)
I prefer RubyMine over the alternatives, even if it’s not free. Worth it!


#9

RubyMine is indeed the best there is! I love it.


#10

Thanks Thomas,
We have the debugger up and running on RubyMine on mac!


#11

Oh, right - Mac! Then my VBS was of little help. What did you use to execute SU instead?


#12

At this time just paste the startup line in the OS X terminal.


#13

We should find a way to automate that as well. We like automation. :slight_smile:


#14

It’s possible to do, but we hadn’t the time yesterday to figure it out. If we found it, I let you know.


#15

Hi all,

I tried tt_su’s hints (adapted to my Windows 8 PC setup, that is), but didn’t succeed: SketchUp just sits there and seems to be frozen.

Here is what I am doing:

  1. installed SketchUp 2014 to “D:\SketchUp 2014\SketchUp.exe”
  2. installed RubyMine 6 to “C:\Program Files (x86)\JetBrains\RubyMine
    6.0.1\bin\rubymine.exe” & made sure that it (and Ruby’s debugger) works flawlessly
  3. installed SketchUp-Ruby-API Debugger from https://github.com/SketchUp/sketchup-ruby-debugger by putting the (32 bit-) version of “SURubyDebugger.dll” into the respective SketchUp root directory, that is: “D:\SketchUp 2014\SURubyDebugger.dll”
  4. made a small test-script, containing just the following:

puts "Hello World!"
Sketchup.active_model.entities.add_line [0,0,0], [9,9,9]
puts “thats all folks!”

This script I made inside RubyMine into a new RubyMine project “SketchUpTest” as a file named “HelloSketchUpWorld.rb”, that is:

“C:\Users\kr\RubymineProjects\SketchUpTest\HelloSketchUpWorld.rb”

As tt_su suggested, I created a “Ruby remote debug” entry. I gave it the „Name“ = „SketchUp 2014“, set:

  • remote port = 7000,
  • local port = 26162 (that is, its “magic” default)
  • remote root = local root = "C:\Users\kr\RubymineProjects\SketchUpTest“ (that is, to where my HelloSketchUpWorld.rb file is lcoated

-Perhaps that is already wrong and in conflict with SU’s defaults(?). Anyway, I adapted the VBS script to match my instance of Sketchup.exe:

Dim objShell
Set objShell = WScript.CreateObject(“WScript.Shell”)
objShell.Run(""“D:\SketchUp 2014\SketchUp.exe”" -rdebug ““ide port=7000"””)
Set objShell = Nothing

So far, so good. Some „OK“s later, I’m back in RubyMine’s regular main window. There, a right click on the „SketchUpTest“ project now offers a „Debug SketchUp“ group with my newly created „Invoke SketchUp 2014 Remote Debug“ item in it. Selecting it, the VBS-script starts and shoots up SketchUp 2014, but afterwards, SketchUp just sits there and does… …nothing! Just displays Win 8’s hour-glass, -seems it is waiting forever in remote mode that RubyMine connects.

Alt-Tab back to RubyMine doesn’t help either: wscript.exe tells that it successfully finished to run the VBS, but the HelloSketchUpWorld.rb script is not shown running (no matter whether one has set breakpoints on any of the three code lines in before or not), no console window or whatever else.

-What is wrong with my settings? I guess that the directories might conflict, but am not sure.
I’m happy to write & publish a step-by-step tutorial once I got that beast working, but for the moment being, I’m truly lost… :frowning:

tia,
Kristine


#16

Been a while since I used the debugger now. Just tired it up to test myself. When I used the context menu to launch I saw the same thing - SU started, but it appear to only start SketchUp in debug mode without connecting to it. Not sure why that is.

On the other hand, when I launched from the toolbar it worked fine. I think that one starts the last used debugger. Not sure why there is a difference…


#17

Ah, so I think the menu item refer to the tool that runs before the debugging only. It doesn’t actually launch the debugger.

I confused myself by naming the external tool “Debug SketchUp”. Naming it “Launch SketchUp in Debug Mode” makes it clearer what the different menu items are.

Instead one should select the debug config in the drop down list in the toolbar:


#18

Hei ThomThom,

well… -seems you have confused me, either… :smile:

I tried to follow your steps, but to no avail…

-Here is a (a bit lengthy…) PDF step-by-step approach with screenshots which I took:
http://ul.to/8k823bc5

I’d really like to nail this one down & polish it into a fool-proof tutorial for all here. I’m volunteering for the fool, but’d need one for the proof… :wink:

-Do you see the difference why this works at yours, but not here?

paljon kiitoksia!
Kristine


#19

Can you upload directly to the forum instead of using services that has time-delay and ads to download?


#20

I gave up after 3 ad-popups…