Debugging with VS Code with Electron - Teradata/covalent-electron GitHub Wiki
Setup VS Code to Attach to Electron for Debugging
-
Launch VS Code
-
Click on Extensions Button

- When extension list appears in the search box search for ‘chrome’

- Install the ‘Debugger for Chrome’ extension

-
After installing click to Relaunch VS Code
-
Once VS Code is up Go to View->Debug

- Under the ‘No Configurations’ drop down

- Pick ‘Add Configuration’

- When launch.json comes up in editor pane, pick Chrome: Launch

- Change the configuration to be:

-
Save file
-
Under Configuration Drop down pick Launch Electron Main

-
Make sure all Electron windows are closed
-
Run
npm run live-reload -
Once Electron is fully up, Click Play button

- Set a breakpoint in a ts file by clicking on left of line number

-
Go to place where that line is executed in Electron App
-
See it hit the breakpoint and use controls to step through file
