add vscode debug configuration for insomnia-app (#3918)

Add debug configuration for insomnia-app in vs-code
This commit is contained in:
James Gatz
2021-09-03 18:10:35 +02:00
committed by GitHub
parent e3484ced8f
commit 1ddc386ac5
2 changed files with 133 additions and 0 deletions

66
.vscode/launch.json vendored Normal file
View File

@@ -0,0 +1,66 @@
{
"version": "0.2.0",
"configurations": [
{
"name": "Electron: main",
"type": "node",
"request": "launch",
"protocol": "inspector",
"sourceMaps": true,
"presentation": {
"hidden": true,
"group": "Insomnia",
"order": 1
},
"cwd": "${workspaceFolder}/packages/insomnia-app",
"runtimeExecutable": "${workspaceFolder}/packages/insomnia-app/node_modules/.bin/electron",
"runtimeArgs": ["--remote-debugging-port=9222", "."],
"outputCapture": "std",
"sourceMapPathOverrides": {
"webpack:///./*": "${workspaceFolder}/packages/insomnia-app/app/*"
},
"windows": {
"type": "node",
"request": "launch",
"name": "Electron: main",
"runtimeExecutable": "${workspaceFolder}/packages/insomnia-app/node_modules/.bin/electron.cmd"
},
"env": {
"TS_NODE_PROJECT": "tsconfig.webpack.json",
"NODE_ENV": "development",
"ELECTRON_IS_DEV": "1"
}
},
{
"name": "Electron: renderer",
"type": "pwa-chrome",
"request": "attach",
"presentation": {
"hidden": true,
"group": "Insomnia",
"order": 2
},
"port": 9222,
"sourceMapPathOverrides": {
"webpack:///./*": "${workspaceFolder}/packages/insomnia-app/app/*"
},
"webRoot": "${workspaceFolder}/packages/insomnia-app/app",
"timeout": 60000
}
],
"compounds": [
{
"name": "Insomnia",
"presentation": {
"hidden": false,
"group": "Insomnia",
"order": 0
},
"preLaunchTask": "Insomnia: Compile (Watch)",
"configurations": [
"Electron: main",
"Electron: renderer",
],
}
]
}

67
.vscode/tasks.json vendored Normal file
View File

@@ -0,0 +1,67 @@
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"label": "Insomnia: Compile Main",
"detail": "webpack --config webpack/webpack.config.electron.ts",
"type": "shell",
"promptOnClose": false,
"options": {
"cwd": "${workspaceFolder}/packages/insomnia-app",
"env": {
"NODE_ENV": "development",
"TS_NODE_PROJECT": "tsconfig.webpack.json"
}
},
"command": "${workspaceRoot}/packages/insomnia-app/node_modules/.bin/webpack --config webpack/webpack.config.electron.ts"
},
{
"label": "Insomnia: Compile Renderer (Watch)",
"detail": "webpack-dev-server --config webpack/webpack.config.development.ts",
"type": "shell",
"promptOnClose": false,
"options": {
"cwd": "${workspaceFolder}/packages/insomnia-app",
"env": {
"TS_NODE_PROJECT": "tsconfig.webpack.json"
}
},
"isBackground": true,
"problemMatcher": {
"owner": "webpack",
"severity": "error",
"fileLocation": "absolute",
"pattern": [
{
"regexp": "ERROR in (.*)",
"file": 1
},
{
"regexp": "\\((\\d+),(\\d+)\\):(.*)",
"line": 1,
"column": 2,
"message": 3
}
],
"background": {
"activeOnStart": true,
"beginsPattern": "Compiling\\.\\.\\.",
"endsPattern": {
"regexp": "Compiled"
}
},
},
"command": "${workspaceRoot}/packages/insomnia-app/node_modules/.bin/webpack-dev-server --config webpack/webpack.config.development.ts"
},
{
"label": "Insomnia: Compile (Watch)",
"detail": "Compile Renderer (Watch) | Compile Main",
"dependsOn": [
"Insomnia: Compile Renderer (Watch)",
"Insomnia: Compile Main",
]
}
]
}