-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Update FAQs.md to include debugging #2343
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
Changes from all commits
7a09eab
6bbbeac
c5a39e7
23f4995
210e945
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,7 +3,8 @@ | |
| ## Table of Contents | ||
| * Setup: [Debugging Setup](#debugging-setup) | ||
| * Debugger: [Why is debugging not working?](#why-is-debugging-not-working) | ||
| * Build: [How to enable debug symbols?](#how-to-enable-debug-symbols) | ||
| * Build: [How to enable debug symbols](#how-to-enable-debug-symbols) | ||
| * Logging: [How to enable logging](#how-to-enable-logging) | ||
|
|
||
| ## Debugging Setup | ||
| The debugger needs to be configured to know which executable and debugger to use: | ||
|
|
@@ -43,3 +44,39 @@ When in doubt, please check your compiler's documentation for the options necess | |
|
|
||
| * #### cl.exe | ||
| Symbols are located in the `*.pdb` file. | ||
|
|
||
| ## How to enable logging | ||
|
|
||
| Enabling logging will show communication information between VS Code and our extension and between our extension and the debugger. | ||
|
|
||
| ### Logging for `MI` debuggers | ||
|
|
||
| The logging block with its defaults is as follows: | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think it might be better to show code snippets with the values you want people to copy. If you redirect people here, they are likely to want to do that rather than see what the defaults are.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There are different combinations depending on what the user wants to see.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sure, but the topic is called "how to enable logging" and I suspect not everyone is going to read deeply. You don't have to change it. It's just my 2 cents. I don't imagine most people will know what an "MI" debugger is either. |
||
|
|
||
| ``` | ||
| "logging": { | ||
| "trace": false, | ||
| "traceResponse": false, | ||
| "engineLogging": false | ||
| } | ||
| ``` | ||
|
|
||
| #### VS Code and the CppTools extension | ||
|
|
||
| The logging here is called `trace` logging and can be enabled by setting `trace` and `traceResponse` to `true` in the logging block inside `launch.json`. This will help diagnose issues related to VS Code's communication to our extension and our responses. | ||
|
|
||
| #### CppTools extension and the debugger | ||
|
|
||
| The logging between CppTools and the debugger is called `engineLogging`. When using an `MI` debugger such as `gdb` or `lldb`, this will show the request, response and events using the `mi` interpreter. This logging will help us determine whether the debugger is receiving the right commands and generating the correct responses. | ||
|
|
||
| ### Logging for `Visual C++` debugger | ||
|
|
||
| The logging block with its defaults is as follows: | ||
|
|
||
| ``` | ||
| "logging": { | ||
| "engineLogging": false | ||
| } | ||
| ``` | ||
|
|
||
| The `Visual C++` debugger logging will show only the communication to and from VS Code as all communication to the debugger is done internally to the process and is not visible through logging. | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This sentence seems a little vague. Maybe be more specific on what you mean when you say "our extension" and the "debugger" just in case people don't know what's being referred to?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Leslie and I talked offline. This is documentation in our repo so "this extension" should be clear but i'll change it to say "cpptools extension"