electron debug查调用方法 在Electron中进行调试,你可以使用VSCode的内置调试器。以下是一个基本的步骤: 1.下载并安装VSCode。 2.在VSCode中打开你的Electron项目。 3.在VSCode的""文件中加入以下配置: ```json { "version": "", "configurations": [ { "name": "Debug Main Process", "type": "node", ...
5. 在.VSCode文件夹中新建一个tasks.json文件 {"version":"0.1.0","command":"gulp","isShellCommand":true,"args":["--no-color"],"tasks":[{"taskName":"run","args":[],"isBuildCommand":true}]} 6. 配置调试启动环境 按F5 会出来选择调试环境, 选择 Node.js vscode会生成一个launch.json文...
2、点击vscode左侧菜单栏的调试按钮 image.png 3、点击配置项下拉框,选择‘’添加配置‘’: image.png 4、选择node.js image.png 5、会打开launch.json配置文件 image.png 6、将原配置删除,替换如下配置并保存: {"version":"0.2.0","configurations":[{"name":"Debug Main Process","type":"node","reque...
或者使用快捷键F5,然后选择Node.js,会自动生成该文件 接下来,就可以点击菜单Debug -> Start Debugging,也可以直接按快捷键F5,启动程序
1) 在当前工程下,创建文件 .vscode/launch.json 2) 在该文件中输入以下内容 { “version”: “0.2.0”, “configurations”: [ { “name”: “Debug Main Process”, “type”: “node”, “request”: “launch”, “cwd”: “${workspaceRoot}”, ...
打开VSCode下的Debug下的launch.json 然后将launch.json改为 { "version": "0.2.0", "configurations": [ { "name": "Debug Main Process", "type": "node", "request": "launch", "cwd": "${workspaceRoot}", "runtimeExecutable": "${workspaceRoot}/node_modules/.bin/electron", ...
使用VSCode 打开 ,做如下操作: 生成如下配置的lauch.json文件: { // 使用 IntelliSense 了解相关属性。 // 悬停以查看现有属性的描述。 // 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387 "version": "0.2.0", "configurations": [ ...
首先需要在vscode中添加配置文件。打开vscode 点击左侧小虫子按钮在绿色三角右边如果第一次进入可以点击上下三角箭头来创建launch.json配置文件。如果已近有了launch.json 可以直接右侧齿轮即可直接打开。 打开之后分两种情况,一种是全局安装 electron 的,一种是仅在当前工程下安装electron的两种配置不一样。
When we have completed the above environment setup and file configuration, we can debug happily (breakpoints as needed): Everyone should be familiar with the debugging method of VSCode, so I won't go into details here. I hope you will have a good debugging and happy fishing!