Skip to content

Commit 1d17ced

Browse files
docs(debug): Add guide on enabling Debug logs (aws#5490)
<!--- REMINDER: - Read CONTRIBUTING.md first. - Add test coverage for your changes. - Update the changelog using `npm run newChange`. - Link to related issues/commits. - Testing: how did you test your changes? - Screenshots (if the pull request is related to UI/UX then please include light and dark theme screenshots) --> ## License By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license. Signed-off-by: Nikolas Komonen <[email protected]>
1 parent 2349b6e commit 1d17ced

File tree

7 files changed

+21
-4
lines changed

7 files changed

+21
-4
lines changed

CONTRIBUTING.md

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -344,9 +344,6 @@ The `aws.dev.forceDevMode` setting enables or disables Toolkit "dev mode". Witho
344344
- Use `getLogger()` to log debugging messages, warnings, etc.
345345
- Example: `getLogger().error('topic: widget failed: %O', { foo: 'bar', baz: 42 })`
346346
- Log messages are written to the extension Output channel, which you can view in vscode by visiting the "Output" panel and selecting `AWS Toolkit Logs` or `Amazon Q Logs`.
347-
- While viewing the Output channel (`AWS Toolkit Logs` or `Amazon Q Logs`) in vscode:
348-
- Click the "gear" icon to [select a log level](https://github.com/aws/aws-toolkit-vscode/pull/4859) ("Debug", "Info", "Error", …).
349-
- Click the "..." icon to open the log file.
350347
- Use the `aws.dev.logfile` setting to set the logfile path to a fixed location, so you can follow
351348
and filter logs using shell tools like `tail` and `grep`. For example in settings.json,
352349
```
@@ -362,6 +359,21 @@ The `aws.dev.forceDevMode` setting enables or disables Toolkit "dev mode". Witho
362359
- Enter text in the Debug Console filter box to show only log messages with that text. <br/>
363360
<img src="./docs/images/debug-console-filter.png" alt="VSCode Debug Console" width="320"/>
364361
362+
#### Enabling Debug Logs
363+
364+
How to enable more detailed debug logs in the extensions.
365+
If you need to report an issue attach these to give the most detailed information.
366+
367+
1. Open the Command Palette (`cmd/ctrl` + `shift` + `p`), then search for "View Logs". Choose the correct option for the extension you want, eg: `AWS: View Logs` or `Amazon Q: View Logs`
368+
![](./docs/images/logsView.png)
369+
2. Click the gear icon on the bottom right and select `Debug`
370+
![](./docs/images/logsSetDebug.png)
371+
3. Click the gear icon again and select `Set As Default`. This will ensure we stay in `Debug` until explicitly changed
372+
![](./docs/images/logsSetDefault.png)
373+
4. Open the Command Palette again and select `Reload Window`.
374+
5. Now you should see additional `[debug]` prefixed logs in the output.
375+
![](./docs/images/logsDebugLog.png)
376+
365377
### Telemetry
366378
367379
- See [docs/telemetry.md](./docs/telemetry.md) for guidelines on developing telemetry in this project.

docs/faq-credentials.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# FAQ / Troubleshooting
1+
# FAQ / Troubleshooting - Auth/SSO/Credentials
22

33
### AWS Builder ID "Invalid client provided"
44

docs/faq-debug.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# FAQ / Troubleshooting - Debugging/Development
2+
3+
### Enabling Debug Logs
4+
5+
[See steps here to enable more detailed debug logs for the extension.](../CONTRIBUTING.md#enabling-debug-logs)

docs/images/logsDebugLog.png

126 KB
Loading

docs/images/logsSetDebug.png

173 KB
Loading

docs/images/logsSetDefault.png

147 KB
Loading

docs/images/logsView.png

164 KB
Loading

0 commit comments

Comments
 (0)