The right choice of a Ruby debugger for Sketchup API

Hello everybody.
Can someone advise me to choose a Ruby debugger for API Sketchup.
Sketchup Make version 17.2.2555 64 bit
SketchUp Ruby Code Editor

By: Alexander C. Schreyer (www.alexschreyer.net)

Version: 4.1
or Ruby Console +
OS Windows 10 Family

Thanks in advance

A code editor is not a debugger. Not all editors can interface with a debugger, but most IDEs can.

This is the only debugger that will work with SketchUp. There are some IDEs listed in the README file …

Ok DanRathbun
Thank you. However, the site offers us the choice between 4 IDE:
Aptana RadRails,
NetBeans
RubyMine
Code VS
Which one to choose?
especially since I have not been able to install RubyMine with the SURUByDebugger.dll dll. By launching sketchup with the command
SketchUp.exe -rdebug “ide port = 7000”, sketchup loads but nothing else happens …

I use NetBeans. It’s free and works on Windows or Mac.

OK Neil_Burkholder
Thank you. I will try to install it.

I personally use RubyMine and VSCode. VScode is by go-to code editor for most things. The recent updates to the Ruby extensions makes it very powerful. Nearly IDE like.

For my larger projects I’ve been using RubyMine.

OK tt_su Thank you

Like @Neil_Burkholder I use NetBeans. RubyMine is more Ruby-specific, but it has an ongoing cost: $199 first year, $159 second year, $119 each year thereafter. I need that level of debugging seldom enough that it isn’t worth that much to me. NetBeans is free.

How is NetBeans in terms of setting up for debugging?

I find RubyMine (and similar IDEs) have a larger overhead of setting up for debugging - as they require a project to be set up.

Where as VSCode I can just fire it up and get started much quicker when I’m looking to to a quick debug. Lowers the threshold to use the debugger when there’s less up front config.

It’s also an IDE, so yes there is project-oriented overhead and some potential confusion about where the ruby files need to be located. I wonder if there is a light-weight option similar to VSCode for Mac?

With NetBeans I can be debugging in under 30 seconds. Most of that time is opening the SketchUp and NetBeans. The debugger actually connects in about a second.

In addition to that I have a toolbar button to load the files I’m working on.

image

I simply add the files I need to debug, and then press the toolbar button to reload them whenever I make a change.

If you have multiple extensions/projects I would simply use an if statement to load the relevant files for the extension you are working on at the moment.

I also have a test.rb that I use for loading and debugging quick tests.

Hi Neil_Burkholder,

After loading and installing NetBeans IDE 8.2, the Ruby Rails plugins and Path Tools I am blocked!
That’s what I get when I open NetBeans .:
image

I have no order. I can not even open a new project The tools are all grayed out!
What should I do to solve this problem?
Thanks in advance

Light weight option? Are you thinking about Visual Studio (IDE)? Which is very different from Visual Studio Code (Code/Text Editor).

For my extension work I load them from my source repository via a proxy-loader I place in the Plugins directory. Something like described here: GitHub - SketchUp/sketchup-ruby-api-tutorials: SketchUp Ruby API Tutorials and Examples

That makes it easy to set up editors for debugging.

I was referring to this comment in your earlier post about having something with less setup than a full IDE.

VSCode is not an IDE. Powerful code editor.

So the question remains: does anyone know of an equally powerful code editor for Mac that integrates with the debugger?

VSCode is available for Windows, Mac, Linux. One of the better cross platform editors.

Or, load your extension (or proxy loader that loads multiple extensions and/or tests) using the RubyStartup argument. Combined with tasks in vscode I believe it is a good flow, which I use for all my extension work.

1 Like