Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: add note about how to attach debugger #6273

Merged
merged 8 commits into from
Apr 25, 2024
Merged
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,16 @@
DEBUG=true ./bin/run.js [command]
```

### Attaching a Debugger

When debugging a project, it's super helpful to attach a debugger to the CLI. If you use VS Code, here's how you can do it:

Check warning on line 94 in CONTRIBUTING.md

View workflow job for this annotation

GitHub Actions / lint-docs

[vale] reported by reviewdog 🐶 [smart-marks.smartApostrophes] Use a smart apostrophe (’) instead of a straight single quote mark in 'it's' Raw Output: {"message": "[smart-marks.smartApostrophes] Use a smart apostrophe (’) instead of a straight single quote mark in 'it's'", "location": {"path": "CONTRIBUTING.md", "range": {"start": {"line": 94, "column": 27}}}, "severity": "WARNING"}

Check warning on line 94 in CONTRIBUTING.md

View workflow job for this annotation

GitHub Actions / lint-docs

[vale] reported by reviewdog 🐶 [smart-marks.smartApostrophes] Use a smart apostrophe (’) instead of a straight single quote mark in 'here's' Raw Output: {"message": "[smart-marks.smartApostrophes] Use a smart apostrophe (’) instead of a straight single quote mark in 'here's'", "location": {"path": "CONTRIBUTING.md", "range": {"start": {"line": 94, "column": 99}}}, "severity": "WARNING"}

1. Open this repository in VS Code.
2. Open a "JavaScript Debug Terminal" (e.g. by searching for it in the Command Palette (Shift-Cmd+P)). Every Node process that's opened in this terminal will have a debugger attached.

Check warning on line 97 in CONTRIBUTING.md

View workflow job for this annotation

GitHub Actions / lint-docs

[vale] reported by reviewdog 🐶 [smart-marks.smartQuotesBegin] Use a smart opening quote (“) instead of a straight quote for ' "JavaScript' Raw Output: {"message": "[smart-marks.smartQuotesBegin] Use a smart opening quote (“) instead of a straight quote for ' \"JavaScript'", "location": {"path": "CONTRIBUTING.md", "range": {"start": {"line": 97, "column": 10}}}, "severity": "WARNING"}

Check warning on line 97 in CONTRIBUTING.md

View workflow job for this annotation

GitHub Actions / lint-docs

[vale] reported by reviewdog 🐶 [smart-marks.smartQuotesEnd] Use a smart closing quote (”) instead of a straight quote for 'Terminal"' Raw Output: {"message": "[smart-marks.smartQuotesEnd] Use a smart closing quote (”) instead of a straight quote for 'Terminal\"'", "location": {"path": "CONTRIBUTING.md", "range": {"start": {"line": 97, "column": 29}}}, "severity": "WARNING"}

Check warning on line 97 in CONTRIBUTING.md

View workflow job for this annotation

GitHub Actions / lint-docs

[vale] reported by reviewdog 🐶 [smart-marks.smartApostrophes] Use a smart apostrophe (’) instead of a straight single quote mark in 'that's' Raw Output: {"message": "[smart-marks.smartApostrophes] Use a smart apostrophe (’) instead of a straight single quote mark in 'that's'", "location": {"path": "CONTRIBUTING.md", "range": {"start": {"line": 97, "column": 123}}}, "severity": "WARNING"}
3. Place a breakpoint somewhere in the CLI. You will have to place them in the compiled `.js` files as opposed to the `.ts` files.

Check warning on line 98 in CONTRIBUTING.md

View workflow job for this annotation

GitHub Actions / lint-docs

[vale] reported by reviewdog 🐶 [base.spelling] Spellcheck: did you really mean 'breakpoint'? Raw Output: {"message": "[base.spelling] Spellcheck: did you really mean 'breakpoint'?", "location": {"path": "CONTRIBUTING.md", "range": {"start": {"line": 98, "column": 12}}}, "severity": "WARNING"}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't we output source maps to fix this? Or is there some other limitation

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if we can, just wanted to document what's working for me.

4. In your JavaScript Debug Terminal, navigate to the project you'd like to debug.

Check warning on line 99 in CONTRIBUTING.md

View workflow job for this annotation

GitHub Actions / lint-docs

[vale] reported by reviewdog 🐶 [smart-marks.smartApostrophes] Use a smart apostrophe (’) instead of a straight single quote mark in 'you'd' Raw Output: {"message": "[smart-marks.smartApostrophes] Use a smart apostrophe (’) instead of a straight single quote mark in 'you'd'", "location": {"path": "CONTRIBUTING.md", "range": {"start": {"line": 99, "column": 63}}}, "severity": "WARNING"}
5. Run `/path/to/netlify/cli/bin/run.js`. You should see the debugger connecting automatically.

Check warning on line 100 in CONTRIBUTING.md

View workflow job for this annotation

GitHub Actions / lint-docs

[vale] reported by reviewdog 🐶 [base.accessibilityVision] Don't use vision-based terms. Use something inclusive like 'visit', 'find', or 'check' instead of 'see'. Raw Output: {"message": "[base.accessibilityVision] Don't use vision-based terms. Use something inclusive like 'visit', 'find', or 'check' instead of 'see'.", "location": {"path": "CONTRIBUTING.md", "range": {"start": {"line": 100, "column": 54}}}, "severity": "WARNING"}
Skn0tt marked this conversation as resolved.
Show resolved Hide resolved

### Architecture

The CLI is written using the [commander.js](https://github.com/tj/commander.js/) cli interface and the
Expand Down
Loading