Debugging - Breakpoint set but not yet bound



  • Hi, I am trying to debug my electron app in VS Code using the debugger.

    I have followed the steps here:

    I have also successfully installed the Vue Chrome Dev Tools. Thanks for the good gems on how to do that.

    I have two issues.

    • Main issue: all of my breakpoints say “Breakpoint set but not yet bound” and the code does not stop there.
      Secondary (possibly related issue): my debug console has a “reference error” as follows:
    ReferenceError: require is not defined
        at Object.url (http://localhost:8080/app.js:13182:1)
        at __webpack_require__ (http://localhost:8080/app.js:854:30)
        at fn (http://localhost:8080/app.js:151:20)
        at Object../node_modules/webpack-dev-server/client/utils/createSocketUrl.js (http://localhost:8080/vendor.js:121056:11)
        at __webpack_require__ (http://localhost:8080/app.js:854:30)
        at fn (http://localhost:8080/app.js:151:20)
        at Object.<anonymous> (http://localhost:8080/vendor.js:120689:23)
        at Object../node_modules/webpack-dev-server/client/index.js?http://0.0.0.0:8080 (http://localhost:8080/vendor.js:120846:30)
        at __webpack_require__ (http://localhost:8080/app.js:854:30)
        at fn (http://localhost:8080/app.js:151:20)
    external "url":1
    

    My launch.json file is setup as directed (url seems odd for an electron app but I am a newbie):

    {
      "version": "0.2.0",
      "configurations": [
        {
          "type": "chrome",
          "request": "launch",
          "name": "Quasar App: chrome",
          "url": "http://localhost:8080",
          "webRoot": "${workspaceFolder}/src",
          "breakOnLoad": true,
          "sourceMapPathOverrides": {
            "webpack:///./src/*": "${webRoot}/*"
          }
        },
        {
          "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": ["."],
          "outputCapture": "std"
        }
      ]
    }
    

    I also have the ‘source-map’ for the devtool key under build object in quasar.conf.js

    Any ideas?