반응형
[Electron] VSCode에서 디버깅하는 방법
.vscode/launch.json 파일을 다음과 같이 생성한다.

{
"version": "0.2.0",
"configurations": [
{
"name": "Debug Main Process",
"type": "node",
"request": "launch",
"cwd": "${workspaceRoot}",
"runtimeExecutable": "${workspaceRoot}/node_modules/.bin/electron",
"windows": {
"runtimeExecutable": "${workspaceRoot}/node_modules/.bin/electron.cmd"
},
"args" : ["."],
"outputCapture": "std"
}
]
}
그리고 나서, 디버깅 원하는 부분에 breakpoints를 main.js(메인 프로세스)에 찍고 `F5` 누르면 자동으로 main 프로세스 디버깅이 된다.
반응형
'WEB > Electron' 카테고리의 다른 글
| [Electron] Access to XMLHttpRequest at '' from origin '' has been blocked by CORS policy 에러 해결 방법 (1) | 2019.05.25 |
|---|---|
| [Electron] Electron + vue.js (0) | 2019.05.25 |
| [Electron] window.require is not a function 에러 (0) | 2019.05.08 |
| [Electron] electron 최신 버전으로 업그레이드 (0) | 2019.05.04 |
| [Electron] 빌드(build) 하기 ( electron-builder ) (0) | 2019.04.29 |