Merge pull request #213 from Mafi78/AddVSDebug

Added Debug possibilities to VS Code
This commit is contained in:
Jooy authored and GitHub committed 2025-05-02 10:12:26 +09:00
commit 8620b21fa0
2 files changed
+39 -6

No files matched your search

+35 -4
View File
@@ -2,9 +2,11 @@
"version": "1.0.0",
"compounds": [
{
"name": "Debug Run",
"name": "Debug Everything",
"configurations": [
"Debug App"
"Launch App",
"Attach to Main Process",
"Attach to Renderer Process"
],
"presentation": {
"hidden": false,
@@ -16,7 +18,7 @@
],
"configurations": [
{
"name": "Debug App",
"name": "Launch App",
"request": "launch",
"type": "node",
"timeout": 60000,
@@ -26,7 +28,36 @@
],
"cwd": "${workspaceRoot}",
"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,
}
]
}
+4 -2
View File
@@ -29,14 +29,16 @@ export default defineConfig(({ mode }) => {
{
entry: 'src/main/index.ts',
onstart({ startup }) {
startup()
const debugArgs = ['.', '--inspect=9228', '--remote-debugging-port=9229']
startup(debugArgs)
},
vite: {
root: resolve('.'),
base: './',
publicDir: resolve('./src/public'),
build: {
sourcemap: true,
assetsDir: '.',
publicDir: resolve('./src/public'),
outDir: 'dist/main',
rollupOptions: {
external: ['electron', ...builtinModules]