How to debug an app with Electron and Angular from Visual Studio Code?

前端 未结 1 1572
独厮守ぢ
独厮守ぢ 2021-01-18 04:37

I\'m trying to develop a very simple app using the latest versions of Angular and Electron. For this, I followed the tutorials of Angular and Electron. After a lot of trial

相关标签:
1条回答
  • 2021-01-18 04:59

    Start the electron app using --remote-debug-port option. e.g. using 9222 as debug port:

    electron . --remote-debugging-port=9222
    

    Then configure launch.json like that:

    {
        "version": "0.2.0",
        "configurations": [
            {
                "type": "node",
                "request": "launch",
                "name": "Launch Chrome against localhost",
                "url": "http://localhost:9222",
                "webRoot": "${workspaceFolder}"
            }
        ]
    }
    
    0 讨论(0)
提交回复
热议问题