misc/ vscode debug

This commit is contained in:
Maxime GRIS
2021-03-26 18:53:45 +01:00
parent 54a42eb1e5
commit f4225a3ec1
3 changed files with 59 additions and 17 deletions

40
.vscode/launch.json vendored
View File

@@ -5,32 +5,42 @@
"version": "0.2.0",
"configurations": [
{
"name": "Electron Main Renderer",
"name": "Renderer",
"type": "chrome",
"request": "attach",
"port": 9876,
"url": "http://localhost:4200",
"sourceMaps": true,
"timeout": 10000,
"trace": "verbose",
"sourceMapPathOverrides": {
"webpack:///./*": "${workspaceFolder}/*"
},
"preLaunchTask": "Build.Renderer"
},
{
"name": "Main",
"type": "node",
"request": "launch",
"protocol": "inspector",
// Prelaunch task compiles main.ts for Electron & starts Angular dev server.
"preLaunchTask": "Build.All",
"cwd": "${workspaceFolder}",
"runtimeExecutable": "${workspaceFolder}/node_modules/.bin/electron",
"trace": "verbose",
"runtimeArgs": [
"--serve",
".",
"--remote-debugging-port=9222"
"--remote-debugging-port=9876"
],
"windows": {
"runtimeExecutable": "${workspaceFolder}/node_modules/.bin/electron.cmd"
}
}, {
"name": "Karma Attach Chrome",
"type": "chrome",
"request": "attach",
"port": 9222,
"webRoot": "${workspaceFolder}/",
"sourceMaps": true,
"timeout": 30000,
"trace": true
},
"preLaunchTask": "Build.Main"
}
],
"compounds": [
{
"name": "Application Debug",
"configurations": [ "Renderer", "Main" ]
}
]
}

26
.vscode/tasks.json vendored
View File

@@ -2,9 +2,31 @@
"version": "2.0.0",
"tasks": [
{
"label": "Build.All",
"label": "Build.Main",
"type": "shell",
"command": "npm run electron:serve-tsc && ng serve",
"command": "npm run electron:serve-tsc",
"isBackground": false,
"group": {
"kind": "build",
"isDefault": true
},
"problemMatcher": {
"owner": "typescript",
"source": "ts",
"applyTo": "closedDocuments",
"fileLocation": ["relative", "${cwd}"],
"pattern": "$tsc",
"background": {
"activeOnStart": true,
"beginsPattern": "^.*",
"endsPattern": "^.*Terminal will be reused by tasks, press any key to close it.*"
}
}
},
{
"label": "Build.Renderer",
"type": "shell",
"command": "npm run ng:serve",
"isBackground": true,
"group": {
"kind": "build",