Skip to content

Commit 490fc75

Browse files
authored
Merge pull request #4115 from microsoft/seanmcm/0_25_0_release
Seanmcm/0 25 0 release
2 parents fa4d7b2 + f2959f4 commit 490fc75

File tree

95 files changed

+4871
-2694
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

95 files changed

+4871
-2694
lines changed

.github/ISSUE_TEMPLATE/debugger.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,14 @@ about: Issues pertaining to debugging such as call stack, breakpoints, watch win
66
---
77

88
Type: Debugger
9-
**Input information below**
9+
<!----- Input information below ----->
1010

11-
**Please review existing issues and our documentation at https://github.com/Microsoft/vscode-cpptools/tree/master/Documentation prior to filing an issue.**
11+
<!--
12+
**Prior to filing an issue, please review:**
13+
- Existing issues at https://github.com/Microsoft/vscode-cpptools/issues
14+
- Our documentation at https://code.visualstudio.com/docs/languages/cpp
15+
- FAQs at https://code.visualstudio.com/docs/cpp/faq-cpp
16+
-->
1217

1318
**Describe the bug**
1419
- OS and Version:

.github/ISSUE_TEMPLATE/general-extension.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,14 @@ about: Issues pertaining to downloading, installing, or building the extension.
55
---
66

77
Type: General
8-
**Input information below**
9-
10-
**Please review existing issues and our documentation at https://github.com/Microsoft/vscode-cpptools/tree/master/Documentation prior to filing an issue.**
8+
<!----- Input information below ----->
9+
10+
<!--
11+
**Prior to filing an issue, please review:**
12+
- Existing issues at https://github.com/Microsoft/vscode-cpptools/issues
13+
- Our documentation at https://code.visualstudio.com/docs/languages/cpp
14+
- FAQs at https://code.visualstudio.com/docs/cpp/faq-cpp
15+
-->
1116

1217
**Describe the bug**
1318
- OS and Version:

.github/ISSUE_TEMPLATE/language-service.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,10 @@ about: 'Issues pertaining to IntelliSense, autocomplete, code editing, etc. '
88
<!----- Input information below ----->
99

1010
<!--
11-
**Please review existing issues and our documentation at https://github.com/Microsoft/vscode-cpptools/tree/master/Documentation prior to filing an issue.**
11+
**Prior to filing an issue, please review:**
12+
- Existing issues at https://github.com/Microsoft/vscode-cpptools/issues
13+
- Our documentation at https://code.visualstudio.com/docs/languages/cpp
14+
- FAQs at https://code.visualstudio.com/docs/cpp/faq-cpp
1215
-->
1316

1417
**Describe the bug**
Lines changed: 1 addition & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -1,54 +1 @@
1-
# Pipe Transport
2-
3-
Pipe Transport allows communication through a pipe program to a remote shell. An example on Linux would be `ssh`.
4-
5-
## How-To
6-
7-
We have added `"pipeTransport"` as an option within the **launch.json** file. The structure looks as follows:
8-
```json
9-
"pipeTransport": {
10-
"pipeCwd": "/usr/bin",
11-
"pipeProgram": "/usr/bin/ssh",
12-
"pipeArgs": [
13-
"-pw",
14-
"<password>",
15-
16-
],
17-
"debuggerPath": "/usr/bin/gdb"
18-
},
19-
```
20-
The `pipeArgs` can be any set of arguments necessary to setup and authenticate the pipe connection. In the example, a password is used but you can also use an ssh key.
21-
22-
You may also need to add a `sourceFileMap` to map the path of where the code exists on the remote shell to where it is locally:
23-
```json
24-
"sourceFileMap": {
25-
// "remote": "local"
26-
"/home/user/src": "/src/projectA/src"
27-
}
28-
```
29-
30-
## Attach
31-
32-
You can also use the above `pipeTransport` block to attach to a remote process. In the attach case, you will need to specify a `processId`. We have added the ability to query processes from the remote machine. To do this, change `"processId": "${command.pickProcess}"` to `"processId": "${command.pickRemoteProcess}"`. The `pipeTransport` settings will be used to query the processes on the remote machine. Then select the process from the drop down list. As with `launch`, you may need to configure `sourceFileMap`.
33-
34-
## Docker example
35-
36-
The `pipeTransport` can also be used to debug a process in a Docker container. For an attach, **launch.json** will include:
37-
38-
```json
39-
"pipeTransport": {
40-
"pipeCwd": "${workspaceRoot}",
41-
"pipeProgram": "docker",
42-
"pipeArgs": [
43-
"exec",
44-
"-i",
45-
"hello_gdb",
46-
"sh",
47-
"-c"
48-
],
49-
"debuggerPath": "/usr/bin/gdb"
50-
},
51-
```
52-
Where `hello_gdb` is the name of your container.
53-
54-
Launching a process is accomplished by starting a container and then using the same `pipeTransport` launch additional processes in the container. See this [**launch.json**](https://github.com/andyneff/hello-world-gdb/blob/master/.vscode/launch.json) for a [full example](https://github.com/andyneff/hello-world-gdb/).
1+
The documentation for pipe transport has moved to https://code.visualstudio.com/docs/cpp/pipe-transport.
Lines changed: 1 addition & 91 deletions
Original file line numberDiff line numberDiff line change
@@ -1,91 +1 @@
1-
# Windows 10's Windows Subsystem for Linux
2-
3-
With the release of Windows 10 Creators Update (Build 15063), you will now be able to use Visual Studio Code and the Microsoft C/C++ extension to debug your [Windows Subsystem for Linux (WSL)](https://msdn.microsoft.com/en-us/commandline/wsl/about) projects.
4-
5-
Code can be written on Windows itself using VSCode and debugged through `bash.exe` to the Bash on Windows layer.
6-
7-
As of the Fall Creator's Update, you can have multiple distros installed, but `bash.exe` and `wsl.exe` use the default distro. Use [WSL Config](https://msdn.microsoft.com/en-us/commandline/wsl/wsl-config) to set your default distro.
8-
9-
**NOTE: Creator's Update (Build 15063 or later) is required due to bug-fixes within the subsystem that we rely on to provide debugging. Debugging using a previous version of WSL is unsupported and likely will not work. To check your Windows version, enter `winver` in a command prompt.**
10-
11-
## Prerequisites
12-
13-
* [Windows 10 Creators Update or later with Windows Subsystem for Linux](https://msdn.microsoft.com/en-us/commandline/wsl/install_guide) installed.
14-
* Install g++/gcc and gdb within `WSL` to allow compiling and debugging. You can use the package manager to do this. For example, to install g++, you can run `sudo apt install g++` in the Bash window.
15-
* [Visual Studio Code](https://code.visualstudio.com) + Microsoft C/C++ extension for VSCode.
16-
17-
## How-To
18-
19-
To debug, commands will be routed from Windows through `bash.exe` to set up debugging. Because our extension runs as a 32-bit process, it will need to use the `C:\Windows\SysNative` folder to access the `bash.exe` executable that is normally in `C:\Windows\System32`. We will be using the `"pipeTransport"` ability within the extension to do debugging and `"sourceFileMap"` to map the source from the subsystem's paths back to Windows path.
20-
21-
**NOTE: Applications will need to be compiled in the `Windows Subsystem for Linux (WSL)` prior to debugging.**
22-
23-
### Example `launch.json` for Launching
24-
25-
In the following example, I have a local drive, `Z:\` that has my source code within windows for an app called _kitchensink_. I have set up the `"program"` and `"cwd"` paths to point to the directory within `WSL`. I have set up the `"pipeTransport"` to use `bash.exe`. I have also set up a `"sourceFileMap"` to have everything that is returned by `gdb` that starts with `/mnt/z` to point to `Z:\\` in Windows.
26-
27-
```json
28-
{
29-
"name": "C++ Launch",
30-
"type": "cppdbg",
31-
"request": "launch",
32-
"program": "/mnt/z/Bash/kitchensink/a.out",
33-
"args": ["-fThreading"],
34-
"stopAtEntry": false,
35-
"cwd": "/mnt/z/Bash/kitchensink",
36-
"environment": [],
37-
"externalConsole": true,
38-
"windows": {
39-
"MIMode": "gdb",
40-
"setupCommands": [
41-
{
42-
"description": "Enable pretty-printing for gdb",
43-
"text": "-enable-pretty-printing",
44-
"ignoreFailures": true
45-
}
46-
]
47-
},
48-
"pipeTransport": {
49-
"pipeCwd": "",
50-
"pipeProgram": "c:\\windows\\sysnative\\bash.exe",
51-
"pipeArgs": ["-c"],
52-
"debuggerPath": "/usr/bin/gdb"
53-
},
54-
"sourceFileMap": {
55-
"/mnt/z": "z:\\"
56-
}
57-
}
58-
```
59-
60-
### Example `launch.json` for Attaching to an Existing Process
61-
62-
This configuration similar to the launch process above. I have chosen to start the same application above from the Bash command line and now I want to attach to it for debugging. I have changed the `"processID"` to use the remote process picker by specifying the command `"${command:pickRemoteProcess}"` and set up the same `"sourceFileMap"`. When I press <kbd>F5</kbd> to attach, I get a picker drop down showing the running processes within `WSL`. I can scroll or search for the process I want to attach to and start debugging.
63-
64-
```json
65-
{
66-
"name": "C++ Attach",
67-
"type": "cppdbg",
68-
"request": "attach",
69-
"program": "/mnt/z/Bash/kitchensink/a.out",
70-
"processId": "${command:pickRemoteProcess}",
71-
"windows": {
72-
"MIMode": "gdb",
73-
"setupCommands": [
74-
{
75-
"description": "Enable pretty-printing for gdb",
76-
"text": "-enable-pretty-printing",
77-
"ignoreFailures": true
78-
}
79-
]
80-
},
81-
"pipeTransport": {
82-
"pipeCwd": "",
83-
"pipeProgram": "c:\\windows\\sysnative\\bash.exe",
84-
"pipeArgs": ["-c"],
85-
"debuggerPath": "/usr/bin/gdb"
86-
},
87-
"sourceFileMap": {
88-
"/mnt/z": "z:\\"
89-
}
90-
}
91-
```
1+
The documentation for GCC on Windows Subsystem for Linux (WSL) has moved to https://code.visualstudio.com/docs/cpp/config-wsl.
Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1 @@
1-
# Natvis - Custom views for native objects
2-
3-
The Natvis framework allows developers to write custom schemas to help visualize native objects.
4-
5-
For gdb/lldb debugging (`"type": "cppdbg"`), a subset of the Natvis framework has been ported to the C/C++ extension and the code resides in the [MIEngine](https://github.com/Microsoft/MIEngine) shared component. If additional features that are not implemented are requested, please file an [issue](https://github.com/Microsoft/MIEngine/issues) on the MIEngine GitHub page with details of what is missing.
6-
7-
For Visual C++ debugging (`"type": "cppvsdbg"`), the debugger contains the full implementation of the Natvis framework as Visual Studio.
8-
9-
## Documentation
10-
11-
The official documentation can be found [here](https://docs.microsoft.com/en-us/visualstudio/debugger/create-custom-views-of-native-objects).
12-
13-
## Schema
14-
15-
The Natvis schema can be found [here](natvis.xsd).
1+
The documentation for Natvis has moved to https://code.visualstudio.com/docs/cpp/natvis.

Documentation/FAQs.md

Lines changed: 1 addition & 102 deletions
Original file line numberDiff line numberDiff line change
@@ -1,102 +1 @@
1-
# FAQs
2-
3-
## Table of Contents
4-
* Setup: [Debugging Setup](#debugging-setup)
5-
* Setup: [What is the .vscode/ipch folder?](#what-is-the-vscodeipch-folder)
6-
* Setup: [How do I disable the IntelliSense cache (ipch)?](#how-do-i-disable-the-intellisense-cache-ipch)
7-
* Debugger: [Why is debugging not working?](#why-is-debugging-not-working)
8-
* Build: [How to enable debug symbols](#how-to-enable-debug-symbols)
9-
* Logging: [How to enable logging](#how-to-enable-logging)
10-
11-
## Debugging Setup
12-
The debugger needs to be configured to know which executable and debugger to use:
13-
14-
Click menu item: `Debug` -> `Add Configuration...`
15-
16-
The file **launch.json** will now be open for editing with a new configuration. The default settings will *probably* work except that you need to specify the **program** setting.
17-
18-
See the [**Documentation/Debugger**](https://github.com/Microsoft/vscode-cpptools/tree/master/Documentation/Debugger) folder in this repository for more in-depth documentation on how to configure the debugger.
19-
20-
## What is the .vscode/ipch folder?
21-
22-
The language server caches information about included header files to improve the performance of IntelliSense. When you edit C/C++ files in your workspace folder, the language server will store cache files in the `.vscode/ipch` folder by default. VS Code per-workspace storage folders were not selected for the following reasons:
23-
* The workspace storage location provided by VS Code is somewhat obscure and we had reservations about writing GB's worth of files in this location where users may not see them or know where to find them.
24-
* Parity with Visual Studio. This is how Visual Studio works and they receive little to no feedback/complaints on the location.
25-
26-
With this in mind we knew that we wouldn't be able to please everyone, so we provided settings to allow you to customize this the way that works best for your situation. We also figured that putting the files in the workspace folder would bring the issue to your attention quickly so that you can take action if you don't like the default behavior.
27-
28-
#### `"C_Cpp.intelliSenseCachePath": <string>`
29-
This setting allows you to set workspace or global overrides for the cache path. For example, if you want to share a single cache location for all workspace folders, you just open the VS Code settings, and add a "User" setting for "IntelliSense Cache Path".
30-
31-
#### `"C_Cpp.intelliSenseCacheSize": <number>`
32-
This setting allows you to set a limit on the amount of caching the extension does. This is an approximation, but the extension will make a best effort to keep the cache size as close to the limit you set as possible. If you are sharing the cache location across workspaces as explained above, you can still increase/decrease the limit, but you should make sure that you add a "User" setting for "IntelliSense Cache Size".
33-
34-
## How do I disable the IntelliSense cache (ipch)?
35-
36-
If you do not want to use the IntelliSense caching feature to improve the performance of IntelliSense, you can disable the feature by setting the "IntelliSense Cache Size" setting to 0. (or `"C_Cpp.intelliSenseCacheSize": 0"` in the JSON settings editor)
37-
38-
## Why is debugging not working?
39-
40-
### My breakpoints aren't being hit
41-
42-
When you start debugging, if it is showing that your breakpoints aren't bound (solid red circle) or they are not being hit, you may need to enable [debug symbols](#how-to-enable-debug-symbols) during compilation.
43-
44-
### Debugging starts but all the lines in my stack trace are grey
45-
46-
If your debugger is showing a grey stacktrace or won't stop at a breakpoint, or the symbols in the call stack are grey then your executable was compiled without [debug symbols](#how-to-enable-debug-symbols).
47-
48-
## How to enable debug symbols?
49-
50-
Enabling debug symbols are dependent on the type of compiler you are using. Below are some of the compilers and the compiler options necessary to enable debug symbols.
51-
52-
When in doubt, please check your compiler's documentation for the options necessary to include debug symbols in the output. This may be some variant of `-g` or `--debug`.
53-
54-
* #### Clang (C++)
55-
* If you invoke the compiler manually then add the `--debug` option.
56-
* If you're using a script then make sure the `CXXFLAGS` environment variable is set; e.g. `export CXXFLAGS="${CXXFLAGS} --debug"`
57-
* If you're using CMake then set make sure the `CMAKE_CXX_FLAGS` is set; e.g. `export CMAKE_CXX_FLAGS=${CXXFLAGS}`
58-
59-
* #### Clang (C)
60-
See Clang C++ but use `CFLAGS` instead of `CXXFLAGS`.
61-
62-
* #### gcc or g++
63-
If you invoke the compiler manually, add the `-g` option.
64-
65-
* #### cl.exe
66-
Symbols are located in the `*.pdb` file.
67-
68-
## How to enable logging
69-
70-
Enabling logging will show communication information between VS Code and our extension and between our extension and the debugger.
71-
72-
### Logging for `MI` debuggers
73-
74-
The logging block with its defaults is as follows:
75-
76-
```
77-
"logging": {
78-
"trace": false,
79-
"traceResponse": false,
80-
"engineLogging": false
81-
}
82-
```
83-
84-
#### VS Code and the CppTools extension
85-
86-
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.
87-
88-
#### CppTools extension and the debugger
89-
90-
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.
91-
92-
### Logging for `Visual C++` debugger
93-
94-
The logging block with its defaults is as follows:
95-
96-
```
97-
"logging": {
98-
"engineLogging": false
99-
}
100-
```
101-
102-
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.
1+
The FAQs for the C/C++ extension has moved to https://code.visualstudio.com/docs/cpp/faq-cpp.

0 commit comments

Comments
 (0)