Skip to content

Commit

Permalink
move debugging docs to new file and clarify
Browse files Browse the repository at this point in the history
  • Loading branch information
sarahs committed Jul 14, 2022
1 parent e1530f5 commit 19adea5
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 12 deletions.
13 changes: 13 additions & 0 deletions contributing/debugging-the-docs-application.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
### Debugging the docs application

This repo has configuration for debugging the codebase with VS Code's built-in Node Debugger.

**Note**: These steps will only help with debugging issues in the Node.js codebase, not in the content files.

1. After running the build steps, start the app by running `npm run debug`.
1. In VS Code, click on the Debugging icon in the Activity Bar to bring up the Debug view.
1. In the Debug View, select the **'Node: Nodemon'** configuration, then press <kbd>F5</kbd> or click the green play button. You should see all of your running node processes.
1. Select the node process that's started with the `--inspect` flag.
1. Debugger has now been attached. Enjoy!

For more detailed instructions, please see this [VS Code recipe](https://github.com/Microsoft/vscode-recipes/tree/master/nodemon). You can also learn more about debugging using VS Code [here](https://code.visualstudio.com/docs/editor/debugging).
16 changes: 4 additions & 12 deletions contributing/development.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,24 +30,14 @@ Note that `npm ci` and `npm run build` are steps that should typically only need
- `npm ci` does a clean install of dependencies, without updating the `package-lock.json` file
- `npm run build` creates static assets, such as JavaScript and CSS files

Power users may want to read more about [debugging the docs application](./debugging-the-docs-application.md) with VSCode.

### Using GitHub Codespaces

As an alternative, you can simply use [GitHub Codespaces](https://docs.github.com/en/codespaces/overview). For more information about using a codespace for working on GitHub documentation, see "[Working in a codespace](https://github.com/github/docs/blob/main/contributing/codespace.md)."

In a matter of minutes, you will be ready to edit, preview and test your changes directly from the comfort of your browser.

### Debugging with VS Code

This repo has configuration for debugging with VS Code's built-in Node Debugger.

1. After running the build steps, start the app by running `npm run debug`.
1. In VS Code, click on the Debugging icon in the Activity Bar to bring up the Debug view.
1. In the Debug View, select the **'Node: Nodemon'** configuration, then press <kbd>F5</kbd> or click the green play button. You should see all of your running node processes.
1. Select the node process that's started with the `--inspect` flag.
1. Debugger has now been attached. Enjoy!

For more detailed instructions, please see this [VS Code recipe](https://github.com/Microsoft/vscode-recipes/tree/master/nodemon). You can also learn more about debugging using VS Code [here](https://code.visualstudio.com/docs/editor/debugging).

### Using browser shortcuts

The [`script/bookmarklets`](../script/bookmarklets) directory contains some browser shortcuts that can help with reviewing GitHub documentation. See [`script/bookmarklets/README.md`](../script/bookmarklets/README.md) for details.
Expand All @@ -72,6 +62,8 @@ The tooling for this site has changed over the years, but many of the tried-and-
- Markdown files can contain [frontmatter](https://jekyllrb.com/docs/front-matter).
- The [`redirect_from`](https://github.com/jekyll/jekyll-redirect-from) Jekyll plugin behavior is supported.

## READMEs

For more info about working with this site, check out these READMEs:

- [content/README.md](../content/README.md)
Expand Down

0 comments on commit 19adea5

Please sign in to comment.