Debugging in VSCode

    1. Open an Electron project in VSCode.

    2. Add a file .vscode/launch.json with the following configuration:

    3. Debugging

    Set some breakpoints in main.js, and start debugging in the . You should be able to hit the breakpoints.

    Debugging the Electron codebase

    If you want to build Electron from source and modify the native Electron codebase, this section will help you in testing your modifications.

    Windows (C++)

    1. Open an Electron project in VSCode.

    2. Add a file .vscode/launch.json with the following configuration:

    Configuration Notes

    • requires the built-in C/C++ extension be enabled.
    • your-executable-location will be one of the following depending on a few items:
      • Testing: If you are using the default settings of or the default instructions when building from source.
      • : If you built a Release build rather than a Testing build.
      • your-directory-name: If you modified this during your build process from the default, this will be whatever you specified.
    • The args array string "your-electron-project-path" should be the absolute path to either the directory or main.js file of the Electron project you are using for testing. In this example, it should be your path to .

    3. Debugging