1

I'm running Window 7 | 64-bit. I'm trying to setup Visual Studio Code as my debugging environment for Sketchup 2016 extensions, for which tasks.json must be setup in VSCode to execute Sketchup with command line arguments. I'm receiving what looks like a general error relating to json files, but i a mot familiar with json and have struggled all day to find a workaround.

I'm receiving the following error:

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

& was unexpected at this time. The terminal process terminated with exit code: 1

in relation to the following tasks.json

{
    // 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'"
        }
      }
    ]
  }

I've tried various syntax approaches such using \\ and removing the & (for which I can't find documentation)

Can anyone see how to fix the syntax?

Thanks Alex

AlexS
  • 510
  • 2
  • 7
  • 23

1 Answers1

0

What terminal are you using? cmd or Powershell?

I made a little Ruby gem to aid me in launching SketchUp - takes care of the cross platform differences: https://github.com/thomthom/skippy

I made use of it in this VSCode project example: https://github.com/SketchUp/sketchup-extension-vscode-project

thomthom
  • 2,854
  • 1
  • 23
  • 53
  • I'm running into a vscode / sketchup issue myself. If I run `skippy sketchup:debug 2021` on the command line, sketchup 2021 does open (but breakpoints do not work). If I try to use `run task...` from vscode *sketchup does not start at all*. [public GitHub repo](https://github.com/habermeier/autowindow.git) is based on your VSCode Project for SketchUp Extension project -- I have done very little to it yet. – Bernie Habermeier Jan 10 '21 at 19:32
  • Have you remembered to install the debugger DLL? With SU2021 you need a newer version than in SU2019-SU2020. – thomthom Jan 10 '21 at 20:35
  • Yep I installed [1.3.0.0](https://github.com/SketchUp/sketchup-ruby-debugger) on my mac. – Bernie Habermeier Jan 11 '21 at 16:10
  • Can you open an issue in the repository? Easier to follow up there as we need to gather more details. – thomthom Jan 11 '21 at 20:36
  • Thanks. I added the issue [here](https://github.com/SketchUp/sketchup-extension-vscode-project/issues/7). – Bernie Habermeier Jan 12 '21 at 00:12