feat(🌱): support Debug in VSCode

This commit is contained in:
草鞋没号 committed 2022-07-22 15:28:23 +08:00
1 parent 1c3614081d
commit fe103943f2
2 files changed
+28 -5

No files matched your search

+4
View File
@@ -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' },