Browse Source

文档修改

master
lniwn 6 years ago
parent
commit
bceba21f9b
  1. 27
      content/posts/2019/使用Electron+React开发跨平台桌面应用.md

27
content/posts/2019/使用Electron+React开发跨平台桌面应用.md

@ -411,9 +411,34 @@ F:\Project\electron\web-designer-test @@ -411,9 +411,34 @@ F:\Project\electron\web-designer-test
mainWindow = new BrowserWindow({width: 900, height: 680, webPreferences: {nodeIntegration: true}});
```
- 使用VSCode进行主进程调试
添加一个文件`.vscode/launch.json`在项目根目录,然后即可使用VSCode进行调试。
```json
{
"version": "0.2.0",
"configurations": [
{
"name": "Debug Main Process",
"type": "node",
"request": "launch",
"cwd": "${workspaceRoot}",
"runtimeExecutable": "${workspaceRoot}/node_modules/.bin/electron",
"windows": {
"runtimeExecutable": "${workspaceRoot}/node_modules/.bin/electron.cmd"
},
"args" : ["."],
"outputCapture": "std"
}
]
}
```
*参考文档*
参考文档*
- https://www.codementor.io/randyfindley/how-to-build-an-electron-app-using-create-react-app-and-electron-builder-ss1k0sfer
- https://juejin.im/post/5c356a396fb9a049e30848f0
Loading…
Cancel
Save