The Ruby community enjoys debugging with Integrated Development Environments (IDE) like RubyMine, NetBeans and Aptana RadRails which usually rely on different gems to be installed for remote debugging. Getting these gems to work within SketchUp’s embedded Ruby is usually difficult. But now, at 3D Basecamp 2014, an open source Ruby debugger framework has been announced which currently supports Windows only but it is expected to support Mac soon. Installing it is very simple:
- Copy SURubyDebugger.dll from GitHub into the SketchUp installation directory: C:\Program Files (x86)\SketchUp\SketchUp 2014.
- SketchUp.exe -rdebug "ide port=1234"
- The port must match the remote debugger port setting configured in the IDE.
- SketchUp will start up and appear to be frozen while waiting for the debugger to show up.
- Launch remote debugging in the IDE, SketchUp should continue running. It is required to observe breakpoints hit when Ruby code execution attains the specified lines.