未从Visual Studio Code中以调试模式加载主HTML文件

时间:2018-10-23 16:43:26

标签: visual-studio-code electron

我有一个简单的electronicjs应用程序。

通过 npm start 启动它,已加载正确的主html文件。 但是在从Visual Studio Code进行调试时,窗口会在bin /电子路径内加载默认内容。

我的launch.json内容是:

{
    // Usare IntelliSense per informazioni sui possibili attributi.
    // Al passaggio del mouse vengono visualizzate le descrizioni degli attributi esistenti.
    // Per ulteriori informazioni, visitare: https://go.microsoft.com/fwlink/?linkid=830387
    "version": "0.2.0",
    "configurations": [
        {
            "type": "node",
            "request": "launch",
            "name": "Avvia programma",
            "program": "${workspaceFolder}/main.js",
            "cwd": "${workspaceFolder}",
            "runtimeExecutable": "${workspaceRoot}/node_modules/.bin/electron",
            "windows": {
              "runtimeExecutable": "${workspaceRoot}/node_modules/.bin/electron.cmd"
            },
            "args" : ["."]
        }
    ]
}

在应用程序中呈现的HTML错误是这样的: enter image description here

正确的html就是这个 enter image description here

也许我对launch.json文件参数有误?

0 个答案:

没有答案