feat(🌱): support Debug in VSCode
This commit is contained in:
1 parent
1c3614081d
commit
fe103943f2
2 files changed
+28
-5
No files matched your search
Vendored
+4
@@ -12,8 +12,12 @@ const pkg = require('../package.json')
|
||||
const envContent = Object.entries(pkg.env).map(([key, val]) => `${key}=${val}`)
|
||||
fs.writeFileSync(path.join(__dirname, '.debug.env'), envContent.join('\n'))
|
||||
|
||||
// for debug
|
||||
fs.writeFileSync(path.join(__dirname, '../node_modules/.electron-vite-debug'), '')
|
||||
|
||||
// bootstrap
|
||||
spawn(
|
||||
// TODO: terminate `npm run dev` when Debug exits.
|
||||
process.platform === 'win32' ? 'npm.cmd' : 'npm',
|
||||
['run', 'dev'],
|
||||
{ stdio: 'inherit' },
|
||||
|
||||
Reference in new issue
Block a user