Skip to content

Commit

Permalink
Debug guide changes based on feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
Jordan Ellis committed Jan 15, 2019
1 parent 8c2fc66 commit a311915
Showing 1 changed file with 23 additions and 2 deletions.
25 changes: 23 additions & 2 deletions docs/DEBUG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
TODO: create a vscode launch.json configuration that attaches to the elctron process. https://stackoverflow.com/a/41073851

## Renderer Process
### Chrome Debugger
1. Start app: `npm run start`.
2. Open Chrome Dev Tools: `F12` in browser, `Ctrl + Shift + I` in electron.
3. Open `Sources` tab.
Expand All @@ -11,8 +12,28 @@ TODO: create a vscode launch.json configuration that attaches to the elctron pro
6. Trigger breakpoint.
> Note: Reloading the page may be required if the code executes at startup.
### VSCode Debugger
1. Download & install the `Debugger for Chrome` VSCode plugin.
2. Start app: `npm run start`.
3. `F5`
4. Select `Chrome`
5. Change `http://localhost:8080` to `http://localhost:3000`
6. `F5`
7. Chrome should startup pointed at the app running at `http://localhost:3000`, and breakpoints in VSCode should work as expected.

## Unit Tests
1. Download & install `Jest` VSCode plugin.
### Happy Path
1. Download & install the `Jest` VSCode plugin.
2. Open the test's source file.
3. A `Debug` button should appear above every test. Place breakpoints, and click debug.
> Note: Restarting VSCode may be required.
> Note: If this button does not appear, here are some troubleshooting steps...
> 1. `Ctrl + Shift + P` and select `Jest: Start Runner`.
> 2. Restarting VSCode.
### Alternate Proof
1. Download & install the `Jest` VSCode plugin.
2. Open the test's source file.
3. Place breakpoints.
4. Go to the Debug view, select the `Jest All` configuration.
5. `F5` or press the green play button.
6. Your breakpoint should now be hit.

0 comments on commit a311915

Please sign in to comment.