代码之家  ›  专栏  ›  技术社区  ›  l33t

调试时未部署VS代码扩展依赖项?

  •  0
  • l33t  · 技术社区  · 5 年前

    跑步 Visual Studio Code 1.52.1

    我创建了一个简单的 VS Code 扩展如中所述 this tutorial 问题是,调试时似乎没有部署此依赖项。


    包.json

    "dependencies": {
        "@types/markdown-table": "^2.0.0"
    }
    

    实际导入如下所示:

    import * as table from 'markdown-table'
    

    然后我就打了 F5

    激活扩展“undefined\u publisher.hello world”失败:无法

    为完整起见,以下是生成的 :

    {
        "compilerOptions": {
            "module": "commonjs",
            "target": "es6",
            "outDir": "out",
            "lib": [
                "es6"
            ],
            "sourceMap": true,
            "rootDir": "src",
            "strict": true
        },
        "exclude": [
            "node_modules",
            ".vscode-test"
        ]
    }
    
    0 回复  |  直到 5 年前
        1
  •  0
  •   Sarah Marie    5 年前

    preLaunchTask .

    例如在 .vscode/launch.json

    {
      "version": "0.2.0",
      "configurations": [
        {
          "name": "Run Extension",
          "type": "extensionHost",
          "request": "launch",
          "runtimeExecutable": "${execPath}",
          "args": ["--extensionDevelopmentPath=${workspaceFolder}"],
          "preLaunchTask": "npm: build"
        }
      ]
    }
    
    推荐文章