diff --git a/.gitignore b/.gitignore index 4653fe16..086aeb67 100644 --- a/.gitignore +++ b/.gitignore @@ -103,6 +103,8 @@ comfyui *.code-workspace .history .vscode/* +!.vscode/launch.json +!.vscode/tasks.json # built assets assets/ComfyUI diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 00000000..bafc2e03 --- /dev/null +++ b/.vscode/launch.json @@ -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"] + } + ] +} diff --git a/.vscode/tasks.json b/.vscode/tasks.json new file mode 100644 index 00000000..225a0c04 --- /dev/null +++ b/.vscode/tasks.json @@ -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.*" + } + } + } + ] +} diff --git a/scripts/launchdev.js b/scripts/launchdev.js index 9bbee1e1..90336ea5 100644 --- a/scripts/launchdev.js +++ b/scripts/launchdev.js @@ -43,7 +43,7 @@ function setupMainPackageWatcher({ resolvedUrls }) { } /** Spawn new electron process */ - electronApp = spawn(String(electronPath), ['.'], { + electronApp = spawn(String(electronPath), ['--inspect=9223', '.'], { stdio: 'inherit', }); diff --git a/src/main/main.ts b/src/main/main.ts new file mode 100644 index 00000000..e69de29b