Added Debug possibilities to VS Code
This commit is contained in:
1 parent
a74cee6536
commit
79302c328d
2 files changed
+40
-7
No files matched your search
Vendored
+35
-4
@@ -2,9 +2,11 @@
|
|||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"compounds": [
|
"compounds": [
|
||||||
{
|
{
|
||||||
"name": "Debug Run",
|
"name": "Debug Everything",
|
||||||
"configurations": [
|
"configurations": [
|
||||||
"Debug App"
|
"Launch App",
|
||||||
|
"Attach to Main Process",
|
||||||
|
"Attach to Renderer Process"
|
||||||
],
|
],
|
||||||
"presentation": {
|
"presentation": {
|
||||||
"hidden": false,
|
"hidden": false,
|
||||||
@@ -16,7 +18,7 @@
|
|||||||
],
|
],
|
||||||
"configurations": [
|
"configurations": [
|
||||||
{
|
{
|
||||||
"name": "Debug App",
|
"name": "Launch App",
|
||||||
"request": "launch",
|
"request": "launch",
|
||||||
"type": "node",
|
"type": "node",
|
||||||
"timeout": 60000,
|
"timeout": 60000,
|
||||||
@@ -26,7 +28,36 @@
|
|||||||
],
|
],
|
||||||
"cwd": "${workspaceRoot}",
|
"cwd": "${workspaceRoot}",
|
||||||
"runtimeExecutable": "npm",
|
"runtimeExecutable": "npm",
|
||||||
"console": "integratedTerminal"
|
"console": "integratedTerminal",
|
||||||
|
"env": {
|
||||||
|
"REMOTE_DEBUGGING_PORT": "9229"
|
||||||
|
},
|
||||||
|
"outputCapture": "std",
|
||||||
|
"sourceMaps": true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Attach to Main Process",
|
||||||
|
"type": "node",
|
||||||
|
"request": "attach",
|
||||||
|
"port": 9228,
|
||||||
|
"restart": false,
|
||||||
|
"timeout": 10000,
|
||||||
|
"skipFiles": ["<node_internals>/**"],
|
||||||
|
"sourceMaps": true,
|
||||||
|
"outFiles": ["${workspaceFolder}/dist/**/*.js"],
|
||||||
|
"outputCapture": "std",
|
||||||
|
"env": {
|
||||||
|
"REMOTE_DEBUGGING_PORT": "9228"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Attach to Renderer Process",
|
||||||
|
"type": "chrome",
|
||||||
|
"request": "attach",
|
||||||
|
"port": 9229,
|
||||||
|
"webRoot": "${workspaceFolder}/src/renderer",
|
||||||
|
"timeout": 30000,
|
||||||
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
+5
-3
@@ -29,14 +29,16 @@ export default defineConfig(({ mode }) => {
|
|||||||
{
|
{
|
||||||
entry: 'src/main/index.ts',
|
entry: 'src/main/index.ts',
|
||||||
onstart({ startup }) {
|
onstart({ startup }) {
|
||||||
startup()
|
const debugArgs = ['.', '--inspect=9228', '--remote-debugging-port=9229']
|
||||||
|
startup(debugArgs)
|
||||||
},
|
},
|
||||||
vite: {
|
vite: {
|
||||||
root: resolve('.'),
|
root: resolve('.'),
|
||||||
base: './',
|
base: './',
|
||||||
build: {
|
|
||||||
assetsDir: '.',
|
|
||||||
publicDir: resolve('./src/public'),
|
publicDir: resolve('./src/public'),
|
||||||
|
build: {
|
||||||
|
sourcemap: true,
|
||||||
|
assetsDir: '.',
|
||||||
outDir: 'dist/main',
|
outDir: 'dist/main',
|
||||||
rollupOptions: {
|
rollupOptions: {
|
||||||
external: ['electron', ...builtinModules]
|
external: ['electron', ...builtinModules]
|
||||||
|
|||||||
Reference in new issue
Block a user