Skip to content

Commit 0b17a5f

Browse files
committed
feat: make easy to run debug mode
1 parent 6da0559 commit 0b17a5f

File tree

2 files changed

+44
-10
lines changed

2 files changed

+44
-10
lines changed

.vscode/launch.json

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,20 +10,20 @@
1010
"type": "extensionHost",
1111
"request": "launch",
1212
"runtimeExecutable": "${execPath}",
13-
"args": [
14-
"--extensionDevelopmentPath=${workspaceFolder}",
15-
],
13+
"args": ["--extensionDevelopmentPath=${workspaceFolder}"],
1614
"sourceMaps": true,
1715
"outFiles": ["${workspaceFolder}/dist/**/*.js"],
18-
"preLaunchTask": "compile",
16+
"preLaunchTask": "debug-mode",
1917
"env": {
2018
"NODE_ENV": "development",
2119
"VSCODE_DEBUG_MODE": "true"
2220
},
23-
"resolveSourceMapLocations": [
24-
"${workspaceFolder}/**",
25-
"!**/node_modules/**"
26-
]
27-
},
21+
"resolveSourceMapLocations": ["${workspaceFolder}/**", "!**/node_modules/**"],
22+
"presentation": {
23+
"hidden": false,
24+
"group": "tasks",
25+
"order": 1
26+
}
27+
}
2828
]
2929
}

.vscode/tasks.json

Lines changed: 35 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
"label": "compile",
88
"type": "npm",
99
"script": "compile",
10-
"dependsOn": ["npm: build:webview"],
1110
"group": {
1211
"kind": "build",
1312
"isDefault": true
@@ -29,6 +28,41 @@
2928
"isDefault": false
3029
}
3130
},
31+
{
32+
"label": "debug-mode",
33+
"dependsOn": ["compile", "npm: dev"],
34+
"group": {
35+
"kind": "build",
36+
"isDefault": false
37+
},
38+
"dependsOrder": "parallel",
39+
"presentation": {
40+
"reveal": "always",
41+
"panel": "new"
42+
}
43+
},
44+
{
45+
"type": "npm",
46+
"script": "dev",
47+
"group": "build",
48+
"problemMatcher": {
49+
"owner": "vite",
50+
"pattern": {
51+
"regexp": "^$"
52+
},
53+
"background": {
54+
"activeOnStart": true,
55+
"beginsPattern": ".*VITE.*",
56+
"endsPattern": ".*Local:.*"
57+
}
58+
},
59+
"isBackground": true,
60+
"label": "npm: dev",
61+
"presentation": {
62+
"group": "watch",
63+
"reveal": "never"
64+
}
65+
},
3266
{
3367
"type": "npm",
3468
"script": "build:webview",

0 commit comments

Comments
 (0)