Skip to content
Merged
Changes from all 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
39 changes: 38 additions & 1 deletion Documentation/FAQs.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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.

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?

Copy link
Contributor Author

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"


### Logging for `MI` debuggers

The logging block with its defaults is as follows:
Copy link
Member

Choose a reason for hiding this comment

The 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.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

There are different combinations depending on what the user wants to see.

Copy link
Member

Choose a reason for hiding this comment

The 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.