electron 渲染進程和主進程調試配置

渲染進程調試(進入網頁版的f12調試模式):

	ctrl shift i 
	View->toggle Developer tools

主進程調試:
	vscode中左側豎直欄第四個運行小蟲子按鈕,在上方設置中查找launch.js
	將其中內容替換成
		{
		  "version": "0.2.0",
		  "configurations": [
		    {
		      "name": "Debug Main Process",
		      "type": "node",
		      "request": "launch",
		      "cwd": "${workspaceFolder}",
		      "runtimeExecutable": "${workspaceFolder}/node_modules/.bin/electron",
		      "windows": {
		        "runtimeExecutable": "${workspaceFolder}/node_modules/.bin/electron.cmd"
		      },
		      "args" : ["."]
		    }
		  ]
		}
	點擊左上角運行按鈕就可進行調試

在這裏插入圖片描述
主進程調試配置圖:
在這裏插入圖片描述

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章