Configure vs-code to debug electron in Ubuntu


#1

I am new in nodejs and try to make desktop app using electron.I have try to debug a boilerplate code from https://github.com/szwacz/electron-boilerplate in vs-code in Ubuntu, i got error. my launch.json file for vs-code is as below. Where i am wrong?

    {
        "version": "0.2.0",
        "configurations": [
            {
                "name": "Launch Electron",
                "type": "node",
                "request": "launch",
                "program": "${workspaceRoot}/app/app.js",
                "stopOnEntry": false,
                "args": [],
                "cwd": "${workspaceRoot}",
                "preLaunchTask": null,
                "runtimeExecutable": "${workspaceRoot}/node_modules/electron-prebuilt/dist/electron",
                "runtimeArgs": [
                    ".",
                    "--enable-logging"
                ],
                "env": {
                    "NODE_ENV": "development"
                },
                "console": "internalConsole",
                "sourceMaps": false,
                "outDir": null
            },
            {
                "name": "Attach",
                "type": "node",
                "request": "attach",
                "port": 5858,
                "address": "localhost",
                "restart": false,
                "sourceMaps": false,
                "outDir": null,
                "localRoot": "${workspaceRoot}",
                "remoteRoot": null
            },
            {
                "name": "Attach to Process",
                "type": "node",
                "request": "attach",
                "processId": "${command.PickProcess}",
                "port": 5858,
                "sourceMaps": false,
                "outDir": null
            }
        ]
    }

exception

Message:"No such module: atom_browser_v8_util"
stack:"Error: No such module: atom_browser_v8_util\n    at Error (native)\n    at process.atomBinding (/media/manoj/F6741AD7741A9B07/Node/Electrone/electron-boilerplate/node_modules/electron-prebuilt/dist/resources/electron.asar/common/init.js:5:20)\n    at Object.<anonymous> (/media/manoj/F6741AD7741A9B07/Node/Electrone/electron-boilerplate/node_modules/electron-prebuilt/dist/resources/electron.asar/browser/api/browser-window.js:6:24)\n    at Module._compile (module.js:556:32)\n    at Object.Module._extensions..js (module.js:565:10)\n    at Module.load (module.js:473:32)\n    at tryModuleLoad (module.js:432:12)\n    at Function.Module._load (module.js:424:3)\n    at Module.require (module.js:483:17)\n    at require (internal/module.js:20:19)"

#2

According to the Visual Studio Code website, it appears that they’ve opted for support via Stack Overflow. You may want to post a question there to get a faster answer.