VSCode, Electron, TypeScript, debugging Renderer process, Setting skipfiles?

Viewed 973

I have started to create an Electron app using Typescript, in VS Code. After lots of reconfiguring, I have been able to get the debugging working except for the skipfiles for the rendering process.

How can I configure the debugger to skip over the code files that are not my code?

this is my current launch.json file.

{
"version": "0.2.0",
"configurations": [
    {
        "name": "Electron: Main",
        "type": "node",
        "request": "launch",
        "program": "${workspaceRoot}\\src\\main.ts",
        "stopOnEntry": false,
        "args": [],
        "cwd": "${workspaceRoot}",
        "runtimeExecutable": "${workspaceRoot}\\node_modules\\.bin\\electron.cmd",
        "runtimeArgs": [
            "--no-lazy",
            "--remote-debugging-port=9223"
        ],
        "env": {},
        "console": "internalConsole",
        "sourceMaps": true,
        "outFiles": [
            "${workspaceFolder}/dist/**/*.js"
        ],
        "skipFiles": [
            // this explains the skipFiles tag
            // https://code.visualstudio.com/docs/nodejs/nodejs-debugging#_skipping-uninteresting-code-node-chrome
            "${workspaceFolder}/node_modules/**/*.js",
            "${workspaceFolder}/lib/**/*.js",
            "<node_internals>/**/*.js"
          ]
    },
    {
        "name": "Electron: Renderer",
        "type": "chrome",
        "request": "attach",
        "port": 9223,
        "webRoot": "${workspaceFolder}",
        "timeout": 30000,
        "skipFiles": [
            // this explains the skipFiles tag
            // https://code.visualstudio.com/docs/nodejs/nodejs-debugging#_skipping-uninteresting-code-node-chrome
            "${workspaceFolder}/node_modules/**/*.js",
            "${workspaceFolder}/lib/**/*.js",
            "<node_internals>/**/*.js"
          ]
    }
],
"compounds": [
    {
        "name": "Electron: All",
        "configurations": [
            "Electron: Main",
            "Electron: Renderer"
        ]
    }
]
}

The skipFiles works for the main process but I still end up in random code when debugging the renderer process. Any suggestions would be appreciated.

0 Answers
Related