Unable to setup VS Code debugger for SketchUp Ruby

Hi
I am trying to set the VS Code debugger for sketchup ruby as per the instructions from the following links

github.com/SketchUp/sketchup-ruby-debugger
but unable to suceed., Attached here with the screen shot of the error & tasks.json & launch.json codes

json

Thanks

first thing to learn is copy/pasting the actual text into a forum code block…

 ignore the hashes unless you want 'comments'...

#```ruby

#  formatted code de-tabed as two spaces...

#```

I’m a mac user so can’t help with your issue…

john

Here is the instruction for correctly posting code …

John he’s actually posting JSON configuration files from MS VSCode. They’re the same format SketchUp now uses for preference files.

So it’d be …

```json
// code here
```

Ie my "launch.json" file …

{
    // Use IntelliSense to learn about possible attributes.
    // Hover to view descriptions of existing attributes.
    // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
    "version": "0.2.0",
    "configurations": [
      {
        "name": "Listen for SURubyDebugger.DLL",
        "type": "Ruby",
        "request": "attach",
        "cwd": "${workspaceRoot}",
        "remoteHost": "127.0.0.1",
        "remotePort": "7000",
        "remoteWorkspaceRoot": "${workspaceRoot}"
      }
    ]
}

And my "tasks.json" file …

{
    // See https://go.microsoft.com/fwlink/?LinkId=733558
    // for the documentation about the tasks.json format
    "version": "2.0.0",
    "tasks": [
      {
        "label": "Debug SketchUp 2016",
        "type": "shell",
        "command": "open -a '/Applications/SketchUp 2016/SketchUp.app' --args -rdebug 'ide port=7000'",
        "windows": {
          "command": "&'C:/Program Files/SketchUp/SketchUp 2016/SketchUp.exe' -rdebug 'ide port=7000'"
        }
      },
      {
        "label": "Debug SketchUp 2017",
        "type": "shell",
        "command": "open -a '/Applications/SketchUp 2017/SketchUp.app' --args -rdebug 'ide port=7000'",
        "windows": {
          "command": "&'C:/Program Files/SketchUp/SketchUp 2017/SketchUp.exe' -rdebug 'ide port=7000'"
        }
      },
      {
        "label": "Debug SketchUp 2018",
        "type": "shell",
        "command": "open -a '/Applications/SketchUp 2018/SketchUp.app' --args -rdebug 'ide port=7000'",
        "windows": {
          "command": "&'C:/Program Files/SketchUp/SketchUp 2018/SketchUp.exe' -rdebug 'ide port=7000'"
        }
      },
      {
        "label": "Debug SketchUp 2019",
        "type": "shell",
        "command": "open -a '/Applications/SketchUp 2019/SketchUp.app' --args -rdebug 'ide port=7000'",
        "windows": {
          "command": "&'C:/Program Files/SketchUp/SketchUp 2019/SketchUp.exe' -rdebug 'ide port=7000'"
        }
      }
    ]
}

When I run a task SketchUp starts and in the terminal pane I see …

> Executing task: &'C:/Program Files/SketchUp/SketchUp 2018/SketchUp.exe' -rdebug 'ide port=7000' <


Terminal will be reused by tasks, press any key to close it.
|

No error. I’ve got VSCode version 1.27.2.

I see an update for VSCode is available. I’ll update and see if I still have no error.

Just updated to VSCode 1.39.2 and I see no errors running a task that launches SU2018.

This issue came up last year. You can follow this link to the solution.

My settings.json file looks like this

{
    // Use PowerShell if available
    "terminal.integrated.shell.windows": "C:\\Windows\\system32\\WindowsPowerShell\\v1.0\\powershell.exe",
    "window.zoomLevel": 1
}
2 Likes

Thanks dan

Thanks William, will check and confirm