michalzaq12 / electron-nuxt

⚡ An Electron & Nuxt.js / Vue.js quick start boilerplate with vue-cli scaffolding, electron-builder, unit/e2e testing, vue-devtools
https://michalzaq12.github.io/electron-nuxt
MIT License
721 stars 77 forks source link

debugging with vscode #585

Open Suyashtnt opened 3 years ago

Suyashtnt commented 3 years ago

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"
          ]
      }
  ]
}
jonasjancarik commented 3 years ago

Did you figure this out eventually?

Suyashtnt commented 3 years ago

Nope

MentalGear commented 2 years ago

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.