Closed lewixlabs closed 3 years ago
Hi, about https://github.com/microsoft/vscode-recipes/tree/master/Electron
I cloned the official boilerplate electron+typescript project https://github.com/electron/electron-quick-start-typescript
Debug on vscode correctly works, but I had to change, in json file, a field in runtimeArgs parameter, from "." to "dist/main.js", otherwise I got this error
Here my edited launch.json, can somebody tell me if is this the right fix? Thanks! Lewix
{ "version": "0.2.0", "configurations": [ { "type": "node", "request": "launch", "name": "Electron: Main", "protocol": "inspector", "runtimeExecutable": "${workspaceFolder}/node_modules/.bin/electron", "runtimeArgs": [ "--remote-debugging-port=9223", "dist/main.js" ], "windows": { "runtimeExecutable": "${workspaceFolder}/node_modules/.bin/electron.cmd" } }, { "name": "Electron: Renderer", "type": "chrome", "request": "attach", "port": 9223, "webRoot": "${workspaceFolder}", "timeout": 30000 } ], "compounds": [ { "name": "Electron: All", "configurations": [ "Electron: Main", "Electron: Renderer" ] } ] }
Both work, but bear in mind of . to work you must have the main set in the package.json in the referenced folder.
.
main
package.json
I didn't remember I had this issue still open, just resolved years ago, but thanks anyway! 👍
Hi, about https://github.com/microsoft/vscode-recipes/tree/master/Electron
I cloned the official boilerplate electron+typescript project https://github.com/electron/electron-quick-start-typescript
Debug on vscode correctly works, but I had to change, in json file, a field in runtimeArgs parameter, from "." to "dist/main.js", otherwise I got this error
Here my edited launch.json, can somebody tell me if is this the right fix? Thanks! Lewix