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.
And this zip contains the SketchUp 2014 Debug.vbs
script I use to launch SketchUp.
SketchUp 2014 Debug.zip (289 Bytes)
Where should het Remote root folder and the local root folders pointing to?
The plugins folder - see the second screenshot.
The path on the screenshot was not fully complete. Should the code to debug also be in the plugin folder?
What code is that? The VBS? That can be anywhere - just give the full path to it.
I’m sorry I mean the ruby code you want to debug.
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!
RubyMine is indeed the best there is! I love it.
Thanks Thomas,
We have the debugger up and running on RubyMine on mac!
Oh, right - Mac! Then my VBS was of little help. What did you use to execute SU instead?
At this time just paste the startup line in the OS X terminal.
We should find a way to automate that as well. We like automation.
It’s possible to do, but we hadn’t the time yesterday to figure it out. If we found it, I let you know.
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:
- installed SketchUp 2014 to “D:\SketchUp 2014\SketchUp.exe”
- 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 - installed SketchUp-Ruby-API Debugger from GitHub - SketchUp/sketchup-ruby-debugger: Ruby API debugger for SketchUp 2014 and later. by putting the (32 bit-) version of “SURubyDebugger.dll” into the respective SketchUp root directory, that is: “D:\SketchUp 2014\SURubyDebugger.dll”
- 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…
tia,
Kristine
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…
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:
Hei ThomThom,
well… -seems you have confused me, either…
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…
-Do you see the difference why this works at yours, but not here?
paljon kiitoksia!
Kristine
Can you upload directly to the forum instead of using services that has time-delay and ads to download?
I gave up after 3 ad-popups…