Skip to content

Commit 2388fa9

Browse files
authored
Update FAQs.md (#2343)
1 parent 3381cde commit 2388fa9

File tree

1 file changed

+38
-1
lines changed

1 file changed

+38
-1
lines changed

Documentation/FAQs.md

Lines changed: 38 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
## Table of Contents
44
* Setup: [Debugging Setup](#debugging-setup)
55
* Debugger: [Why is debugging not working?](#why-is-debugging-not-working)
6-
* Build: [How to enable debug symbols?](#how-to-enable-debug-symbols)
6+
* Build: [How to enable debug symbols](#how-to-enable-debug-symbols)
7+
* Logging: [How to enable logging](#how-to-enable-logging)
78

89
## Debugging Setup
910
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
4344

4445
* #### cl.exe
4546
Symbols are located in the `*.pdb` file.
47+
48+
## How to enable logging
49+
50+
Enabling logging will show communication information between VS Code and our extension and between our extension and the debugger.
51+
52+
### Logging for `MI` debuggers
53+
54+
The logging block with its defaults is as follows:
55+
56+
```
57+
"logging": {
58+
"trace": false,
59+
"traceResponse": false,
60+
"engineLogging": false
61+
}
62+
```
63+
64+
#### VS Code and the CppTools extension
65+
66+
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.
67+
68+
#### CppTools extension and the debugger
69+
70+
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.
71+
72+
### Logging for `Visual C++` debugger
73+
74+
The logging block with its defaults is as follows:
75+
76+
```
77+
"logging": {
78+
"engineLogging": false
79+
}
80+
```
81+
82+
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.

0 commit comments

Comments
 (0)