Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add VSCode debug configuration on debugging electron main process #240

Merged
merged 3 commits into from
Nov 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,8 @@ comfyui
*.code-workspace
.history
.vscode/*
!.vscode/launch.json
!.vscode/tasks.json

# built assets
assets/ComfyUI
Expand Down
23 changes: 23 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"version": "0.2.0",
"configurations": [
{
"name": "Debug Main Process",
"type": "node",
"request": "attach",
"port": 9223,
"cwd": "${workspaceFolder}",
"outputCapture": "std",
"sourceMaps": true,
"resolveSourceMapLocations": ["${workspaceFolder}/src/**", "${workspaceFolder}/.vite/**", "!**/node_modules/**"],
"preLaunchTask": "Start Vite Dev Server",
"autoAttachChildProcesses": true,
"env": {
"ELECTRON_ENABLE_LOGGING": "true",
"ELECTRON_ENABLE_STACK_DUMPING": "true",
"NODE_DEBUG": "true"
},
"outFiles": ["${workspaceFolder}/.vite/**/*.js", "${workspaceFolder}/.vite/**/*.js.map"]
}
]
}
21 changes: 21 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"version": "2.0.0",
"tasks": [
{
"label": "Start Vite Dev Server",
"type": "shell",
"command": "yarn start",
"isBackground": true,
"problemMatcher": {
"pattern": {
"regexp": "^.*$"
},
"background": {
"activeOnStart": true,
"beginsPattern": ".*",
"endsPattern": "App ready.*"
}
}
}
]
}
2 changes: 1 addition & 1 deletion scripts/launchdev.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ function setupMainPackageWatcher({ resolvedUrls }) {
}

/** Spawn new electron process */
electronApp = spawn(String(electronPath), ['.'], {
electronApp = spawn(String(electronPath), ['--inspect=9223', '.'], {
stdio: 'inherit',
});

Expand Down
Empty file added src/main/main.ts
Empty file.
Loading