electron-nuxt icon indicating copy to clipboard operation
electron-nuxt copied to clipboard

debugging with vscode

Open Suyashtnt opened this issue 3 years ago • 3 comments

I want to debug with vscode, i got the main process to work but not the renderer process

config:

{
  "version": "0.2.0",
  "configurations": [
      {
          "type": "node",
          "request": "launch",
          "name": "Electron: Main",
          "protocol": "inspector",
          "runtimeExecutable": "yarn",
          "runtimeArgs": [
              "dev",
              "--remote-debugging-port=9223"
          ],
          "windows": {
              "runtimeExecutable": "${workspaceFolder}/node_modules/.bin/electron.cmd"
          }
      },
      {
          "name": "Electron: Renderer",
          "type": "chrome",
          "request": "attach",
          "port": 9223,
          "webRoot": "${workspaceFolder}",
          "timeout": 30000
      }
  ],
  "compounds": [
      {
          "name": "Electron: All",
          "configurations": [
              "Electron: Main",
              "Electron: Renderer"
          ]
      }
  ]
}

Suyashtnt avatar Jan 10 '21 08:01 Suyashtnt

Did you figure this out eventually?

jonasjancarik avatar Oct 24 '21 08:10 jonasjancarik

Nope

Suyashtnt avatar Oct 27 '21 10:10 Suyashtnt

Correction: This works on 'debugger' statements, but breakpoints don't break.

{
  "configurations": [
    {
      // ONLY 'debugger'
      // BREAKPOINTS NOT WORKING
      "command": "yarn dev",
      "name": "Run App in Dev Mode",
      "request": "launch",
      "type": "node-terminal"
    }
  ]
}

If anyone else got any ideas, then comment.

MentalGear avatar Dec 03 '21 17:12 MentalGear