1

我正在运行窗口 7 | 64 位。我正在尝试将 Visual Studio Code 设置为 Sketchup 2016 扩展的调试环境,为此必须在 VSCode 中设置 tasks.json 才能使用命令行参数执行 Sketchup。我收到了与 json 文件相关的一般错误,但我对 json 并不熟悉,并且整天都在努力寻找解决方法。

我收到以下错误:

> 执行任务:&'C:/Program Files/SketchUp/SketchUp 2016/SketchUp.exe' -rdebug 'ide port=7000' <

&此时出乎意料。终端进程以退出代码终止:1

关于以下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'"
        }
      }
    ]
  }

我尝试了各种语法方法,例如使用 \\ 和删除 & (我找不到文档)

谁能看到如何修复语法?

谢谢亚历克斯

4

1 回答 1

0

你用的是什么终端?cmd还是Powershell?

我制作了一个小 Ruby gem 来帮助我启动 SketchUp - 处理跨平台差异:https ://github.com/thomthom/skippy

我在这个 VSCode 项目示例中使用了它: https ://github.com/SketchUp/sketchup-extension-vscode-project

于 2019-02-06T16:52:12.767 回答