Коммит
e5976d2656
|
@ -0,0 +1,3 @@
|
|||
## Microsoft Open Source Code of Conduct
|
||||
|
||||
This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact opencode@microsoft.com with any additional questions or comments.
|
|
@ -1,18 +1,20 @@
|
|||
# How to Contribute Changes
|
||||
|
||||
## Contribution Steps:
|
||||
* [Build and debug the extension](Documentation/Getting%20started.md#build-and-debug-the-cpptools-extension).
|
||||
* File an [issue](https://github.com/Microsoft/vscode-cpptools/issues) and a [pull request](https://github.com/Microsoft/vscode-cpptools/pulls) with the change and we will review it.
|
||||
* If the change affects functionality, add a line describing the change to [CHANGELOG.md](Extension/CHANGELOG.md).
|
||||
* Try and add a test in [test/extension.test.ts](Extension/test/unitTests/extension.test.ts).
|
||||
* Run tests via opening the [Extension](https://github.com/Microsoft/vscode-cpptools/tree/master/Extension) folder in Visual Studio Code, selecting the `Launch Tests` configuration in the Debug pane, and choosing `Start Debugging`.
|
||||
## Contribution Steps
|
||||
|
||||
* [Build and debug the extension](Documentation/Getting%20started.md#build-and-debug-the-cpptools-extension).
|
||||
* File an [issue](https://github.com/Microsoft/vscode-cpptools/issues) and a [pull request](https://github.com/Microsoft/vscode-cpptools/pulls) with the change and we will review it.
|
||||
* If the change affects functionality, add a line describing the change to [**CHANGELOG.md**](Extension/CHANGELOG.md).
|
||||
* Try and add a test in [**test/extension.test.ts**](Extension/test/unitTests/extension.test.ts).
|
||||
* Run tests via opening the [**Extension**](https://github.com/Microsoft/vscode-cpptools/tree/master/Extension) folder in Visual Studio Code, selecting the "Launch Tests" configuration in the Debug pane, and choosing "Start Debugging".
|
||||
|
||||
## About the Code
|
||||
* Execution starts in the `activate` method in [main.ts](Extension/src/main.ts).
|
||||
* `processRuntimeDependencies` handles the downloading and installation of the OS-dependent files. Downloading code exists in [packageManager.ts](Extension/src/packageManager.ts).
|
||||
* `downloadCpptoolsJsonPkg` handles the `cpptools.json`, which can be used to enable changes to occur mid-update, such as turning the `intelliSenseEngine` to `"Default"` for a certain percentage of users.
|
||||
* The debugger code is in the [Debugger](https://github.com/Microsoft/vscode-cpptools/tree/master/Extension/src/Debugger) folder.
|
||||
* [LanguageServer/client.ts](Extension/src/LanguageServer/client.ts) handles various language server functionality.
|
||||
* [LanguageServer/configurations.ts](Extension/src/LanguageServer/configurations.ts) handles functionality related to `c_cpp_properties.json`.
|
||||
* [telemetry.ts](Extension/src/telemetry.ts): Telemetry data gets sent to either `logLanguageServerEvent` or `logDebuggerEvent`.
|
||||
* The Tag Parser (symbol database) doesn't automatically expand macros, so the [cpp.hint](Extension/cpp.hint) file contains definitions of macros that should be expanded in order for symbols to be parsed correctly.
|
||||
|
||||
* Execution starts in the `activate` method in [**main.ts**](Extension/src/main.ts).
|
||||
* `processRuntimeDependencies` handles the downloading and installation of the OS-dependent files. Downloading code exists in [**packageManager.ts**](Extension/src/packageManager.ts).
|
||||
* `downloadCpptoolsJsonPkg` handles the **cpptools.json**, which can be used to enable changes to occur mid-update, such as turning the `intelliSenseEngine` to `"Default"` for a certain percentage of users.
|
||||
* The debugger code is in the [**Debugger**](https://github.com/Microsoft/vscode-cpptools/tree/master/Extension/src/Debugger) folder.
|
||||
* [**LanguageServer/client.ts**](Extension/src/LanguageServer/client.ts) handles various language server functionality.
|
||||
* [**LanguageServer/configurations.ts**](Extension/src/LanguageServer/configurations.ts) handles functionality related to **c_cpp_properties.json**.
|
||||
* [**telemetry.ts**](Extension/src/telemetry.ts): Telemetry data gets sent to either `logLanguageServerEvent` or `logDebuggerEvent`.
|
||||
* The Tag Parser (symbol database) doesn't automatically expand macros, so the [**cpp.hint**](Extension/cpp.hint) file contains definitions of macros that should be expanded in order for symbols to be parsed correctly.
|
||||
|
|
|
@ -0,0 +1,14 @@
|
|||
## How to build and debug the Microsoft CppTools Extension
|
||||
|
||||
These steps will allow you to debug the TypeScript code that is part of the Microsoft CppTools extension for Visual Studio Code.
|
||||
|
||||
Prerequisite steps:
|
||||
* Clone [this](https://github.com/Microsoft/vscode-cpptools) repository.
|
||||
* Install [npm](https://nodejs.org).
|
||||
* From a command line, run the following commands from the **Extension** folder in the root of the repository:
|
||||
* `npm install -g vsce` will install `vsce` globally to create the vsix package.
|
||||
* `npm install` will install the dependencies needed to build the extension.
|
||||
* Set an environment variable `CPPTOOLS_DEV=1`.
|
||||
* This enables the local developer workflow, copying dependencies from the **node_modules** folder.
|
||||
* Open the **Extension** folder in Visual Studio Code and F5.
|
||||
* Read the [contributing guidelines](https://github.com/Microsoft/vscode-cpptools/blob/master/CONTRIBUTING.md).
|
|
@ -1,7 +1,8 @@
|
|||
# How To Debug MIEngine (Work in Progress)
|
||||
|
||||
*This is a work in progress. Please create a pull request with updates if there is anything wrong with it.*
|
||||
|
||||
MIEngine is one of the components used to enable the C/C++ debugging scenario with the Microsoft C/C++ extension with VS Code. This document is to help enable users who want to debug and contribute to MIEngine to fix issues or extend functionality. MIEngine is used to communicate with `gdb/lldb` using the MI protocol.
|
||||
MIEngine is one of the components used to enable the C/C++ debugging scenario with the Microsoft C/C++ extension with VS Code. This document is to help enable users who want to debug and contribute to MIEngine to fix issues or extend functionality. MIEngine is used to communicate with `gdb`/`lldb` using the MI protocol.
|
||||
|
||||
**Repository:** https://github.com/Microsoft/MIEngine
|
||||
|
||||
|
@ -9,7 +10,7 @@ MIEngine is one of the components used to enable the C/C++ debugging scenario wi
|
|||
|
||||
To build MIEngine, you will either need Visual Studio 2015+ installed or at the very least [MSBuild](https://github.com/Microsoft/msbuild) installed. The configuration you want to build is `Desktop.Debug`.
|
||||
|
||||
You can open the solution file `MIDebugEngine.sln` located under `src` and change the configuration and build. You will want to look in the `bin\Desktop.Debug` folder for the compiled bits. You will need to copy the following files to your `.vscode\extensions\ms-vscode.cpptools-<version>\debugadapters\bin` folder in your users/home folder:
|
||||
You can open the solution file **MIDebugEngine.sln** located under **src** and change the configuration and build. You will want to look in the **bin\Desktop.Debug** folder for the compiled bits. You will need to copy the following files to your **.vscode\extensions\ms-vscode.cpptools-\<version\>\debugadapters\bin** folder in your users/home folder:
|
||||
|
||||
* Microsoft.MICore.dll
|
||||
* Microsoft.MICore.XmlSerializers.dll
|
||||
|
@ -27,7 +28,7 @@ The symbol files are as follows:
|
|||
|
||||
### Debugging On Windows
|
||||
|
||||
On Windows, the easiest way to debug is to use Visual Studio. Locate the `package.json` file in the extension folder and open it in an editor.
|
||||
On Windows, the easiest way to debug is to use Visual Studio. Locate the **package.json** file in the **Extension** folder and open it in an editor.
|
||||
|
||||
Locate the following line:
|
||||
```json
|
||||
|
@ -49,29 +50,32 @@ On Linux and Mac OS X, we use `mono` as our framework. You can download Xamarin
|
|||
2. Install [Xamarin Studio v5.10.1.6](http://download.xamarin.com/studio/Windows/XamarinStudio-5.10.1.6-0.msi)
|
||||
|
||||
Remote attach functionality behind a flag. You can run it like this:
|
||||
```
|
||||
cd "\Program Files (x86)\MonoDevelop\bin"
|
||||
set MONODEVELOP_SDB_TEST=1
|
||||
MonoDevelop.exe
|
||||
```PowerShell
|
||||
cd "\Program Files (x86)\MonoDevelop\bin"
|
||||
set MONODEVELOP_SDB_TEST=1
|
||||
MonoDevelop.exe
|
||||
```
|
||||
|
||||
#### Create an empty project for attaching (one-time setup)
|
||||
|
||||
1. Launch MonoDevelop
|
||||
2. File -> New Solution
|
||||
3. Misc/Generic Project
|
||||
4. Name project and hit "Create"
|
||||
5. Right-click the project node (blue square) and do "Options"
|
||||
6. Under Run -> Custom Commands, select "Execute" in the lower dropdown and choose a command (I use c:\windows\notepad.exe - it doesn't matter what the command is, but MonoDevelop requires it to exist before it'll light up the Run menu).
|
||||
6. Under Run -> Custom Commands, select "Execute" in the lower dropdown and choose a command (I use `c:\windows\notepad.exe` - it doesn't matter what the command is, but MonoDevelop requires it to exist before it'll light up the Run menu).
|
||||
|
||||
#### Configure the extension to enable remote debugging
|
||||
Open the `~/.vscode/extensions/ms-vscode.cpptools-<version>/debugAdapters/OpenDebugAD7` file with a text editor and locate and uncomment the line at the bottom. When you start debugging, it will now hang until the remote debugger is attached from Xamarin Studio.
|
||||
|
||||
Open the **~/.vscode/extensions/ms-vscode.cpptools-\<version\>/debugAdapters/OpenDebugAD7** file with a text editor and locate and uncomment the line at the bottom. When you start debugging, it will now hang until the remote debugger is attached from Xamarin Studio.
|
||||
|
||||
#### Attach the remote debugger
|
||||
|
||||
In MonoDevelop: Run -> Run With -> Custom Command Mono Soft Debugger
|
||||
Fill in the IP and port of the Linux/Mac OS X machine and hit "Connect" to start debugging
|
||||
|
||||
After you've done this once, you can hit the MonoDevelop "Play" button or F5 to bring up the connect dialog again.
|
||||
After you've done this once, you can hit the MonoDevelop "Play" button or <kbd>F5</kbd> to bring up the connect dialog again.
|
||||
|
||||
Note: If you are debugging to CentOS, you will need to make an exception in the firewall
|
||||
* sudo firewall-cmd --zone=public --add-port=1234/tcp --permanent
|
||||
* sudo firewall-cmd --reload
|
||||
* `sudo firewall-cmd --zone=public --add-port=1234/tcp --permanent`
|
||||
* `sudo firewall-cmd --reload`
|
||||
|
|
|
@ -1,52 +1,54 @@
|
|||
# Pipe Transport
|
||||
Pipe Transport allows communication through a pipe program to a remote shell. An example on linux would be `ssh`.
|
||||
|
||||
Pipe Transport allows communication through a pipe program to a remote shell. An example on Linux would be `ssh`.
|
||||
|
||||
## How-To
|
||||
We have added `"pipeTransport"` as an option within the `launch.json` file. The structure looks as follows:
|
||||
```
|
||||
"pipeTransport": {
|
||||
"pipeCwd": "/usr/bin",
|
||||
"pipeProgram": "/usr/bin/ssh",
|
||||
"pipeArgs": [
|
||||
"-pw",
|
||||
"<password>",
|
||||
"user@10.10.10.10"
|
||||
],
|
||||
"debuggerPath": "/usr/bin/gdb"
|
||||
},
|
||||
|
||||
We have added `"pipeTransport"` as an option within the **launch.json** file. The structure looks as follows:
|
||||
```json
|
||||
"pipeTransport": {
|
||||
"pipeCwd": "/usr/bin",
|
||||
"pipeProgram": "/usr/bin/ssh",
|
||||
"pipeArgs": [
|
||||
"-pw",
|
||||
"<password>",
|
||||
"user@10.10.10.10"
|
||||
],
|
||||
"debuggerPath": "/usr/bin/gdb"
|
||||
},
|
||||
```
|
||||
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.
|
||||
|
||||
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:
|
||||
```
|
||||
"sourceFileMap": {
|
||||
// "remote": "local"
|
||||
"/home/user/src": "/src/projectA/src"
|
||||
}
|
||||
```json
|
||||
"sourceFileMap": {
|
||||
// "remote": "local"
|
||||
"/home/user/src": "/src/projectA/src"
|
||||
}
|
||||
```
|
||||
|
||||
## Attach
|
||||
|
||||
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`.
|
||||
|
||||
## Docker example
|
||||
|
||||
The `pipeTransport` can also be used to debug a process in a Docker container. For an attach, the `launch.json` will include:
|
||||
The `pipeTransport` can also be used to debug a process in a Docker container. For an attach, **launch.json** will include:
|
||||
|
||||
```json
|
||||
"pipeTransport": {
|
||||
"pipeCwd": "${workspaceRoot}",
|
||||
"pipeProgram": "docker",
|
||||
"pipeArgs": [
|
||||
"exec",
|
||||
"-i",
|
||||
"hello_gdb",
|
||||
"sh",
|
||||
"-c"
|
||||
],
|
||||
"debuggerPath": "/usr/bin/gdb"
|
||||
},
|
||||
```
|
||||
"pipeTransport": {
|
||||
"pipeCwd": "${workspaceRoot}",
|
||||
"pipeProgram": "docker",
|
||||
"pipeArgs": [
|
||||
"exec",
|
||||
"-i",
|
||||
"hello_gdb",
|
||||
"sh",
|
||||
"-c"
|
||||
],
|
||||
"debuggerPath": "/usr/bin/gdb"
|
||||
},
|
||||
```
|
||||
|
||||
Where `hello_gdb` is the name of your container.
|
||||
|
||||
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/)
|
||||
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,88 +1,91 @@
|
|||
# Windows 10's Windows Subsystem for Linux
|
||||
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)` [Bash on Ubuntu](https://msdn.microsoft.com/en-us/commandline/wsl/about) projects.
|
||||
|
||||
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.
|
||||
|
||||
Code can be written on Windows itself using VSCode and debugged through `bash.exe` to the Bash on Windows layer.
|
||||
|
||||
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.
|
||||
|
||||
**NOTE: Creator's Update (Build 15063 or later) is required due to bugfixes 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.**
|
||||
**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.**
|
||||
|
||||
## Prerequisites
|
||||
|
||||
* [Windows 10 Creators Update or later with Windows Subsystem for Linux](https://msdn.microsoft.com/en-us/commandline/wsl/install_guide) installed.
|
||||
* 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.
|
||||
* [Visual Studio Code](https://code.visualstudio.com) + Microsoft C/C++ extension for VSCode.
|
||||
|
||||
## How-To
|
||||
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.
|
||||
|
||||
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.
|
||||
|
||||
**NOTE: Applications will need to be compiled in the `Windows Subsystem for Linux (WSL)` prior to debugging.**
|
||||
|
||||
### Example `launch.json` for Launching
|
||||
|
||||
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.
|
||||
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.
|
||||
|
||||
```
|
||||
{
|
||||
"name": "C++ Launch",
|
||||
"type": "cppdbg",
|
||||
"request": "launch",
|
||||
"program": "/mnt/z/Bash/kitchensink/a.out",
|
||||
"args": ["-fThreading"],
|
||||
"stopAtEntry": false,
|
||||
"cwd": "/mnt/z/Bash/kitchensink",
|
||||
"environment": [],
|
||||
"externalConsole": true,
|
||||
"windows": {
|
||||
"MIMode": "gdb",
|
||||
"setupCommands": [
|
||||
{
|
||||
"description": "Enable pretty-printing for gdb",
|
||||
"text": "-enable-pretty-printing",
|
||||
"ignoreFailures": true
|
||||
}
|
||||
]
|
||||
},
|
||||
"pipeTransport": {
|
||||
"pipeCwd": "",
|
||||
"pipeProgram": "c:\\windows\\sysnative\\bash.exe",
|
||||
"pipeArgs": ["-c"],
|
||||
"debuggerPath": "/usr/bin/gdb"
|
||||
},
|
||||
"sourceFileMap": {
|
||||
"/mnt/z": "z:\\"
|
||||
```json
|
||||
{
|
||||
"name": "C++ Launch",
|
||||
"type": "cppdbg",
|
||||
"request": "launch",
|
||||
"program": "/mnt/z/Bash/kitchensink/a.out",
|
||||
"args": ["-fThreading"],
|
||||
"stopAtEntry": false,
|
||||
"cwd": "/mnt/z/Bash/kitchensink",
|
||||
"environment": [],
|
||||
"externalConsole": true,
|
||||
"windows": {
|
||||
"MIMode": "gdb",
|
||||
"setupCommands": [
|
||||
{
|
||||
"description": "Enable pretty-printing for gdb",
|
||||
"text": "-enable-pretty-printing",
|
||||
"ignoreFailures": true
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"pipeTransport": {
|
||||
"pipeCwd": "",
|
||||
"pipeProgram": "c:\\windows\\sysnative\\bash.exe",
|
||||
"pipeArgs": ["-c"],
|
||||
"debuggerPath": "/usr/bin/gdb"
|
||||
},
|
||||
"sourceFileMap": {
|
||||
"/mnt/z": "z:\\"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Example `launch.json` for Attaching to an Existing Process
|
||||
|
||||
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 F5 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.
|
||||
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.
|
||||
|
||||
```
|
||||
{
|
||||
"name": "C++ Attach",
|
||||
"type": "cppdbg",
|
||||
"request": "attach",
|
||||
"program": "/mnt/z/Bash/kitchensink/a.out",
|
||||
"processId": "${command:pickRemoteProcess}",
|
||||
"windows": {
|
||||
"MIMode": "gdb",
|
||||
"setupCommands": [
|
||||
{
|
||||
"description": "Enable pretty-printing for gdb",
|
||||
"text": "-enable-pretty-printing",
|
||||
"ignoreFailures": true
|
||||
}
|
||||
]
|
||||
},
|
||||
"pipeTransport": {
|
||||
"pipeCwd": "",
|
||||
"pipeProgram": "c:\\windows\\sysnative\\bash.exe",
|
||||
"pipeArgs": ["-c"],
|
||||
"debuggerPath": "/usr/bin/gdb"
|
||||
},
|
||||
"sourceFileMap": {
|
||||
"/mnt/z": "z:\\"
|
||||
```json
|
||||
{
|
||||
"name": "C++ Attach",
|
||||
"type": "cppdbg",
|
||||
"request": "attach",
|
||||
"program": "/mnt/z/Bash/kitchensink/a.out",
|
||||
"processId": "${command:pickRemoteProcess}",
|
||||
"windows": {
|
||||
"MIMode": "gdb",
|
||||
"setupCommands": [
|
||||
{
|
||||
"description": "Enable pretty-printing for gdb",
|
||||
"text": "-enable-pretty-printing",
|
||||
"ignoreFailures": true
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"pipeTransport": {
|
||||
"pipeCwd": "",
|
||||
"pipeProgram": "c:\\windows\\sysnative\\bash.exe",
|
||||
"pipeArgs": ["-c"],
|
||||
"debuggerPath": "/usr/bin/gdb"
|
||||
},
|
||||
"sourceFileMap": {
|
||||
"/mnt/z": "z:\\"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
# Natvis - Custom views for native objects
|
||||
|
||||
Natvis framework is a framework that allows developers to write custom schemas to help visualize native objects.
|
||||
The Natvis framework allows developers to write custom schemas to help visualize native objects.
|
||||
|
||||
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.
|
||||
|
||||
For Visual C++ debugging (`"type": "cppvsdbg"`), the debugger contains the full implementation of the Natvis framework as Visual Studio.
|
||||
For Visual C++ debugging (`"type": "cppvsdbg"`), the debugger contains the full implementation of the Natvis framework as Visual Studio.
|
||||
|
||||
## Documentation
|
||||
|
||||
Official documentation can be found [here](https://docs.microsoft.com/en-us/visualstudio/debugger/create-custom-views-of-native-objects).
|
||||
The official documentation can be found [here](https://docs.microsoft.com/en-us/visualstudio/debugger/create-custom-views-of-native-objects).
|
||||
|
||||
## Schema
|
||||
|
||||
The natvis schema can be found [here](natvis.xsd).
|
||||
The Natvis schema can be found [here](natvis.xsd).
|
||||
|
|
|
@ -1,22 +1,18 @@
|
|||
# FAQs
|
||||
|
||||
## 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)
|
||||
* 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)
|
||||
|
||||
## Debugging Setup
|
||||
The debugger needs to be configured to know which executable and debugger to use:
|
||||
|
||||
Click menu item: `Debug` -> `Add Configuration...`
|
||||
|
||||
The `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.
|
||||
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.
|
||||
|
||||
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.
|
||||
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.
|
||||
|
||||
## Why is debugging not working?
|
||||
|
||||
|
@ -28,24 +24,22 @@ When you start debugging, if it is showing that your breakpoints aren't bound (s
|
|||
|
||||
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).
|
||||
|
||||
## How to enable debug symbols
|
||||
## How to enable debug symbols?
|
||||
|
||||
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.
|
||||
|
||||
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`.
|
||||
|
||||
#### Clang (C++)
|
||||
If you invoke the compiler manually then add the `--debug` option.
|
||||
* #### Clang (C++)
|
||||
* If you invoke the compiler manually then add the `--debug` option.
|
||||
* If you're using a script then make sure the `CXXFLAGS` environment variable is set; e.g. `export CXXFLAGS="${CXXFLAGS} --debug"`
|
||||
* If you're using CMake then set make sure the `CMAKE_CXX_FLAGS` is set; e.g. `export CMAKE_CXX_FLAGS=${CXXFLAGS}`
|
||||
|
||||
If you're using a script then make sure the `CXXFLAGS` environment variable is set; e.g. `export CXXFLAGS="${CXXFLAGS} --debug"`
|
||||
* #### Clang (C)
|
||||
See Clang C++ but use `CFLAGS` instead of `CXXFLAGS`.
|
||||
|
||||
If you're using cmake then set make sure the `CMAKE_CXX_FLAGS` is set; e.g. `export CMAKE_CXX_FLAGS=${CXXFLAGS}`
|
||||
* #### gcc or g++
|
||||
If you invoke the compiler manually, add the `-g` option.
|
||||
|
||||
#### Clang (C)
|
||||
See Clang C++ but use `CFLAGS` instead of `CXXFLAGS`.
|
||||
|
||||
#### gcc or g++
|
||||
If you invoke the compiler manually, add the `-g` option.
|
||||
|
||||
#### cl.exe
|
||||
Symbols are located in the `*.pdb` file.
|
||||
* #### cl.exe
|
||||
Symbols are located in the `*.pdb` file.
|
||||
|
|
|
@ -1,18 +1,3 @@
|
|||
## How to build and debug the Microsoft CppTools Extension
|
||||
|
||||
These steps will allow you to debug the typescript code that is part of the Microsoft CppTools extension for Visual Studio Code.
|
||||
|
||||
Prerequisite steps:
|
||||
* Clone [this](https://github.com/Microsoft/msvscode-cpptools) repository.
|
||||
* Install [npm](https://nodejs.org).
|
||||
* From a command line, run the following commands from the Extension folder in the root of the repository:
|
||||
* `npm install -g vsce`
|
||||
* This will install `vsce` globally to create the vsix package.
|
||||
* `npm install` will install the dependencies needed to build the extension.
|
||||
* Set an environment variable `CPPTOOLS_DEV=1`.
|
||||
* This enables the local developer workflow, copying dependencies from the `node_modules` folder.
|
||||
* Open the Extension folder in Visual Studio Code and F5.
|
||||
* [How to contribute changes](LanguageServer/How%20to%20Contribute%20Changes.md).
|
||||
|
||||
# Configuring includePath for better IntelliSense results
|
||||
|
||||
|
@ -22,9 +7,9 @@ This page describes how to configure include paths for folders containing C or C
|
|||
|
||||
## Where are the include paths defined?
|
||||
|
||||
The include paths are defined in the `"includePath"` setting in a file called **c_cpp_properties.json** located in the .vscode directory in the opened folder.
|
||||
The include paths are defined in the `"includePath"` setting in a file called **c_cpp_properties.json** located in the **.vscode** directory in the opened folder.
|
||||
|
||||
You can create or open this file by either using the `"C/Cpp: Edit Configurations"` command in the command palette or by selecting `"Edit "includePath" setting"` in the lightbulb menu (see the screenshot below). The quickiest way to locate a lightbulb is to scroll to the top of the source file and click on any green squiggle that shows up under a #include statement.
|
||||
You can create or open this file by either using the `"C/Cpp: Edit Configurations"` command in the command palette or by selecting `"Edit "includePath" setting"` in the lightbulb menu (see the screenshot below). The quickest way to locate a lightbulb is to scroll to the top of the source file and click on any green squiggle that shows up under a #include statement.
|
||||
|
||||
![lightbulb menu "Edit "includePath" setting"](https://github.com/Microsoft/vscode-cpptools/raw/master/Images/Lightbulb.png)
|
||||
|
||||
|
@ -36,9 +21,9 @@ You can create or open this file by either using the `"C/Cpp: Edit Configuration
|
|||
|
||||
You can specify the remaining paths using one of the techniques described below.
|
||||
|
||||
#### 1. Use compile_commands.json file to supply includePaths and defines information
|
||||
#### 1. Use `compile_commands.json` file to supply includePaths and defines information
|
||||
|
||||
The extension can get the information for `"includePath"` and `"defines"` from a compile_commands.json file, which can be auto-generated by many build systems such as CMake and Ninja. Look for the section where your current configuration is defined (by default there's one configuration per OS, such as "Win32 or "Mac"), and set the `"compileCommands"` property in **c_cpp_properties.json** to the full path to your compile_commands.json file and the extension will use that instead of the `"includes"` and `"defines"` properties for IntelliSense.
|
||||
The extension can get the information for `"includePath"` and `"defines"` from a **compile_commands.json** file, which can be auto-generated by many build systems such as CMake and Ninja. Look for the section where your current configuration is defined (by default there's one configuration per OS, such as "Win32 or "Mac"), and set the `"compileCommands"` property in **c_cpp_properties.json** to the full path to your **compile_commands.json** file and the extension will use that instead of the `"includes"` and `"defines"` properties for IntelliSense.
|
||||
|
||||
![use compileCommands setting](https://github.com/Microsoft/vscode-cpptools/raw/master/Images/compile_commands.png)
|
||||
|
||||
|
@ -68,5 +53,4 @@ This indicates that the IntelliSense engine has got the include paths resolved s
|
|||
|
||||
[IntelliSense engines](https://github.com/Microsoft/vscode-cpptools/blob/master/Documentation/LanguageServer/IntelliSense%20engine.md)
|
||||
|
||||
[c_cpp_properties.json reference guide](https://github.com/Microsoft/vscode-cpptools/blob/master/Documentation/LanguageServer/c_cpp_properties.json.md)
|
||||
|
||||
[**c_cpp_properties.json** reference guide](https://github.com/Microsoft/vscode-cpptools/blob/master/Documentation/LanguageServer/c_cpp_properties.json.md)
|
|
@ -2,21 +2,23 @@
|
|||
|
||||
If you are experiencing a problem that we are unable to diagnose based on information in your issue report, we might ask you to enable logging and send us your logs.
|
||||
|
||||
As of version 0.14.0 of the extension, logging information is now delivered directly to the Output window in VSCode. To turn on full logging for an issue report, add `"C_Cpp.loggingLevel": "Information"` to your settings.json.
|
||||
As of version 0.14.0 of the extension, logging information is now delivered directly to the Output window in VSCode. To turn on full logging for an issue report, add `"C_Cpp.loggingLevel": "Information"` to your **settings.json**.
|
||||
|
||||
![image](https://user-images.githubusercontent.com/12818240/31898313-b32ff284-b7cd-11e7-97f5-89df93b5d9de.png)
|
||||
|
||||
#### Old information (it still works, but is no longer recommended):
|
||||
|
||||
~~Logging is controlled by environment variables and is disabled by default. To enable logging, launch VS Code from an environment that contains the following variables:~~
|
||||
<del>
|
||||
Logging is controlled by environment variables and is disabled by default. To enable logging, launch VS Code from an environment that contains the following variables:
|
||||
|
||||
```
|
||||
VSCODE_CPP_LOGDIR=c:\path\to\logfolder
|
||||
VSCODE_CPP_LOGFILE_LEVEL=5
|
||||
```
|
||||
|
||||
~~When you open your folder in VS Code, we will create a vscode.cpp.log.\<pid\>.txt file for each extension process launched (\<pid\> = process id).~~
|
||||
When you open your folder in VS Code, we will create a **vscode.cpp.log.\<pid\>.txt** file for each extension process launched (\<pid\> = process id).
|
||||
|
||||
~~The log file level is a number that determines how much detail we'll log. Level 5 is generally detailed enough to give us information about what is going on in your session. We don't recommend you set this higher than 7 since the log quickly becomes cluttered with information that doesn't really help us diagnose your issues and actually makes it harder for us to spot problems. It may also slow down the extension considerably and make it harder for you to reproduce your problem.~~
|
||||
The log file level is a number that determines how much detail we'll log. Level 5 is generally detailed enough to give us information about what is going on in your session. We don't recommend you set this higher than 7 since the log quickly becomes cluttered with information that doesn't really help us diagnose your issues and actually makes it harder for us to spot problems. It may also slow down the extension considerably and make it harder for you to reproduce your problem.
|
||||
|
||||
~~**Don't forget to remove the environment variables when you are finished providing us with the logs.** You wouldn't want the extension to needlessly spend CPU time and disk space writing data you don't need into log files.~~
|
||||
**Don't forget to remove the environment variables when you are finished providing us with the logs.** You wouldn't want the extension to needlessly spend CPU time and disk space writing data you don't need into log files.
|
||||
</del>
|
||||
|
|
|
@ -1,27 +1,23 @@
|
|||
# Frequently asked questions
|
||||
|
||||
[How do I get IntelliSense to work correctly](#how-do-i-get-intellisense-to-work-correctly)?
|
||||
|
||||
[Why do I see red squiggles under Standard Library types](#why-do-i-see-red-squiggles-under-standard-library-types)?
|
||||
|
||||
[How do I get the new IntelliSense to work with MinGW on Windows](#how-do-i-get-the-new-intellisense-to-work-with-mingw-on-windows)?
|
||||
|
||||
[What is the difference between "includePath" and "browse.path" in c\_cpp\_properties.json](#what-is-the-difference-between-includepath-and-browsepath-in-c_cpp_propertiesjson)?
|
||||
|
||||
[How do I re-create the IntelliSense database](#how-do-i-re-create-the-intellisense-database)?
|
||||
* [How do I get IntelliSense to work correctly?](#how-do-i-get-intellisense-to-work-correctly)
|
||||
* [Why do I see red squiggles under Standard Library types?](#why-do-i-see-red-squiggles-under-standard-library-types)
|
||||
* [How do I get the new IntelliSense to work with MinGW on Windows?](#how-do-i-get-the-new-intellisense-to-work-with-mingw-on-windows)
|
||||
* [What is the difference between `"includePath"` and `"browse.path"` in **c_cpp_properties.json**?](#what-is-the-difference-between-includepath-and-browsepath-in-c_cpp_propertiesjson)
|
||||
* [How do I re-create the IntelliSense database?](#how-do-i-re-create-the-intellisense-database)
|
||||
|
||||
## How do I get IntelliSense to work correctly?
|
||||
|
||||
There are two IntelliSense engines present in the extension: the "fuzzy" engine (or Tag Parser), and the new "Default" engine. If you are using version 0.11.0 or higher of the cpptools extension, then you can preview our new IntelliSense engine which has more accurate auto-complete suggestions and tooltips. To use the new engine, you need to ensure that `"C_Cpp.intelliSenseEngine"` is set to `"Default"` in your settings. Since the engine is still in preview it is not on by default for everyone yet.
|
||||
|
||||
After selecting the IntelliSense engine that you prefer, take a look at the Problems window in VS Code to see if you need to do any further configuration for your folder. For example, the Default engine will not provide squiggles and auto-complete suggestions for a translation unit (read: a source file and its dependencies) if the include path is not configured properly. You can select any of the problems in the window to navigate to the line when the problem was detected and a lightbulb will appear in the editor with some options (code actions) to help you resolve the problem.
|
||||
After selecting the IntelliSense engine that you prefer, take a look at the Problems window in VS Code to see if you need to do any further configuration for your folder. For example, the Default engine will not provide squiggles and auto-complete suggestions for a translation unit (read: a source file and its dependencies) if the include path is not configured properly. You can select any of the problems in the window to navigate to the line when the problem was detected and a lightbulb will appear in the editor with some options (code actions) to help you resolve the problem:
|
||||
|
||||
1. Update your includePath (and preprocessor defines)
|
||||
1. Update your `includePath` (and preprocessor defines)
|
||||
2. Force semantic IntelliSense
|
||||
|
||||
#### Update your includePath (and preprocessor defines)
|
||||
#### Update your `includePath` (and preprocessor defines)
|
||||
|
||||
Selecting this option will open a file called c_cpp_properties.json. If you haven't created this file already, it will be created for you in the .vscode folder of your workspace.
|
||||
Selecting this option will open a file called **c_cpp_properties.json**. If you haven't created this file already, it will be created for you in the **.vscode** folder of your workspace.
|
||||
|
||||
Add the necessary paths to your include files to the `"includePath"` array. The `${workspaceRoot}` variable is available to use to get a relative path to the folder you have opened. Also add any required symbols that need to be defined to the `"defines"` array. Both "\<var\>" and "\<var\>=\<value\>" syntax is accepted. When you edit and save this file, the IntelliSense engine will reset and reparse source your source files and headers with the new settings.
|
||||
|
||||
|
@ -37,21 +33,21 @@ The most common reason for this is missing or sorted include paths. If you are u
|
|||
|
||||
Since MinGW is a relative of GCC, Microsoft mode compilation (which is the default on Windows) doesn't work very well with it. To use GCC/CLang mode, set the `"intelliSenseMode"` property in your **c_cpp_properties.json** file to `"clang-x64"`. An example **c_cpp_properties.json** [is shared here for your convenience](https://github.com/Microsoft/vscode-cpptools/blob/master/Documentation/LanguageServer/MinGW.md).
|
||||
|
||||
## What is the difference between "includePath" and "browse.path" in c\_cpp\_properties.json?
|
||||
## What is the difference between `"includePath"` and `"browse.path"` in **c_cpp_properties.json**?
|
||||
|
||||
Starting with version 0.11.0 of the cpptools extension, there are now two settings in the c\_cpp\_properties.json file. They are used by the different IntelliSense engines that we support and have slightly different meanings for the components that use them.
|
||||
Starting with version 0.11.0 of the cpptools extension, there are now two settings in the **c_cpp_properties.json** file. They are used by the different IntelliSense engines that we support and have slightly different meanings for the components that use them.
|
||||
|
||||
The active IntelliSense engine is controlled via the `"C_Cpp.intelliSenseEngine"` setting in your settings.json file. The valid values for this setting are:
|
||||
* `"Default"`
|
||||
* `"Tag Parser"`
|
||||
The active IntelliSense engine is controlled via the `"C_Cpp.intelliSenseEngine"` setting in your **settings.json** file. The valid values for this setting are `"Default"` and `"Tag Parser"`.
|
||||
|
||||
**includePath**: This array of path strings is used by the new "Default" IntelliSense engine that was introduced in version 0.11.0 of the extension. This new engine provides semantic-aware IntelliSense features and will be the eventual replacement for the Tag Parser that has been powering the extension since it was first released. It currently provides tooltips and error squiggles in the editor. The remaining features (e.g. code completion, signature help, go to definition, ...) are implemented using the Tag Parser's database, so it is still important to ensure that the browse.path setting is properly set.
|
||||
* #### `"includePath"`
|
||||
This array of path strings is used by the new "Default" IntelliSense engine that was introduced in version 0.11.0 of the extension. This new engine provides semantic-aware IntelliSense features and will be the eventual replacement for the Tag Parser that has been powering the extension since it was first released. It currently provides tooltips and error squiggles in the editor. The remaining features (e.g. code completion, signature help, go to definition, ...) are implemented using the Tag Parser's database, so it is still important to ensure that the browse.path setting is properly set.
|
||||
|
||||
The paths that you specify for this setting are the same paths that you would send to your compiler via the `-I` switch. When your source files are parsed, the IntelliSense engine will prepend these paths to the files specified by your `#include` directives while attempting to resolve them. These paths are _not searched recursively_.
|
||||
The paths that you specify for this setting are the same paths that you would send to your compiler via the `-I` switch. When your source files are parsed, the IntelliSense engine will prepend these paths to the files specified by your #include directives while attempting to resolve them. These paths are **not** searched recursively.
|
||||
|
||||
**browse.path**: This array of path strings is used by the "Tag Parser" (a.k.a. "browse engine"). This engine will _recursively_ enumerate all files under the paths specified and track them as potential includes while tag parsing your project folder. To disable recursive enumeration of a path, you can append a `/*` to the path string.
|
||||
* #### `"browse.path"`
|
||||
This array of path strings is used by the "Tag Parser" (a.k.a. "browse engine"). This engine will _recursively_ enumerate all files under the paths specified and track them as potential includes while tag parsing your project folder. To disable recursive enumeration of a path, you can append a `/*` to the path string.
|
||||
|
||||
When you open a workspace for the first time, the extension adds `${workspaceRoot}` to both arrays. If this is undesirable, you can open your c_cpp_properties.json file and remove it.
|
||||
When you open a workspace for the first time, the extension adds `${workspaceRoot}` to both arrays. If this is undesirable, you can open your **c_cpp_properties.json** file and remove it.
|
||||
|
||||
## How do I re-create the IntelliSense database?
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# IntelliSense engines
|
||||
|
||||
There are two IntelliSense engines used to power the C/C++ IntelliSense experience in VS Code.
|
||||
There are two IntelliSense engines used to power the C/C++ IntelliSense experience in VS Code.
|
||||
|
||||
* `"Default"` - Visual Studio's IntelliSense engine, which is the default engine that provides semantic-aware IntelliSense features
|
||||
* `"Tag Parser"` - the "fuzzy" IntelliSense engine that provides quick but "fuzzy" results, is used to provide the fallback experience if the default engine is unable to fully resolve include paths
|
||||
|
@ -15,26 +15,30 @@ Ultimately all the IntelliSense and code browsing features will be powered by th
|
|||
|
||||
The other IntelliSense features, such as global auto-complete, and code browsing features, such as Go to definition/declaration, are currently powered by the "Tag Parser" based engine.
|
||||
|
||||
#### includePath and browse.path
|
||||
The two IntelliSense engines use two differnt settings in the **c_cpp_properties.json** file for specifying include paths. This file is located in the .vscode directory in the opened folder. You can create or open this file by either using the "C/Cpp: Edit Configurations" command in the command palette or by selecting "Edit "includePath" setting" in the lightbulb menu. Look for the following settings in the section where your current configuration is defined (by default there's one configuration per OS, such as "Win32 or "Mac").
|
||||
### `includePath` and `browse.path`
|
||||
The two IntelliSense engines use two different settings in the **c_cpp_properties.json** file for specifying include paths. This file is located in the **.vscode** directory in the opened folder. You can create or open this file by either using the "C/Cpp: Edit Configurations" command in the command palette or by selecting "Edit "includePath" setting" in the lightbulb menu. Look for the following settings in the section where your current configuration is defined (by default there's one configuration per OS, such as "Win32 or "Mac").
|
||||
|
||||
* `"includePath"`: This array of path strings is used by the "Default" IntelliSense engine. The paths that you specify for this setting are the same paths that you would send to your compiler via the -I switch. When your source files are parsed, the IntelliSense engine will prepend these paths to the files specified by your #include directives while attempting to resolve them. These paths are searched **non-recursively**.
|
||||
* #### `"includePath"`
|
||||
This array of path strings is used by the "Default" IntelliSense engine. The paths that you specify for this setting are the same paths that you would send to your compiler via the -I switch. When your source files are parsed, the IntelliSense engine will prepend these paths to the files specified by your #include directives while attempting to resolve them. These paths are searched **non-recursively**.
|
||||
|
||||
* `"browse.path"`: This array of path strings is used by the "Tag Parser" (a.k.a. "browse engine"). This engine will **recursively** enumerate all files under the paths specified and track them as potential includes while tag parsing your project folder. To disable recursive enumeration of a path, you can append a /* to the path string.
|
||||
* #### `"browse.path"`
|
||||
This array of path strings is used by the "Tag Parser" (a.k.a. "browse engine"). This engine will **recursively** enumerate all files under the paths specified and track them as potential includes while tag parsing your project folder. To disable recursive enumeration of a path, you can append a `/*` to the path string.
|
||||
|
||||
#### How fallback works and how to control the behavior
|
||||
### How fallback works and how to control the behavior
|
||||
|
||||
The extension first tries to fully parse any opened file using the "Default" IntelliSense engine. If it discovers that it cannot find a header file or a dependency, it will fall back to the tag parser and provide the fuzzy IntelliSense behavior. The fallback affects a full translation unit (TU), not just a single open file. The Problems panel provides details about unresolved headers and dependencies. Other opened TUs will continue to use the "Default" IntelliSense engine provided that all #include dependencies are resolved.
|
||||
The extension first tries to fully parse any opened file using the "Default" IntelliSense engine. If it discovers that it cannot find a header file or a dependency, it will fall back to the tag parser and provide the fuzzy IntelliSense behavior. The fallback affects a full translation unit (TU), not just a single open file. The Problems panel provides details about unresolved headers and dependencies. Other opened TUs will continue to use the "Default" IntelliSense engine provided that all #include dependencies are resolved.
|
||||
|
||||
We recognize that resolving all #include’s may not be necessary for all projects and you may still want to experience the productivity benefits of using the "Default" sematic engine without customizing the default include path. For that, the “Force semantic IntelliSense” action can be chosen. When invoked, all unresolved #include squiggles will turn red and semantic member list and linting will be enabled in all files regardless of whether or not #include statements can be resolved.
|
||||
We recognize that resolving all #includes may not be necessary for all projects and you may still want to experience the productivity benefits of using the "Default" semantic engine without customizing the default include path. For that, the “Force semantic IntelliSense” action can be chosen. When invoked, all unresolved #include squiggles will turn red and semantic member list and linting will be enabled in all files regardless of whether or not #include statements can be resolved.
|
||||
|
||||
### IntelliSense engine setting
|
||||
|
||||
#### IntelliSense engine setting
|
||||
We recommend using the "Default" engine for the best IntelliSense experience. However, it is possible to explicitly choose the IntelliSense engine by editing your [user or workspace settings](https://code.visualstudio.com/docs/getstarted/settings). The setting you should modify is `"C_Cpp.intelliSenseEngine"`. There are two values for this setting:
|
||||
|
||||
* `"Default"` - use Visual Studio's IntelliSense engine
|
||||
* `"Default"` - use Visual Studio's IntelliSense engine
|
||||
* `"Tag Parser"` - use the "fuzzy" IntelliSense engine
|
||||
|
||||
#### See Also
|
||||
### See Also
|
||||
|
||||
[Configuring includePath for better IntelliSense results](https://github.com/Microsoft/vscode-cpptools/blob/master/Documentation/Getting%20started.md)
|
||||
|
||||
[c_cpp_properties.json reference guide](https://github.com/Microsoft/vscode-cpptools/blob/master/Documentation/LanguageServer/c_cpp_properties.json.md)
|
||||
[**c_cpp_properties.json** reference guide](https://github.com/Microsoft/vscode-cpptools/blob/master/Documentation/LanguageServer/c_cpp_properties.json.md)
|
||||
|
|
|
@ -2,7 +2,7 @@ For developers using MinGW on Windows, we recommend you start with the following
|
|||
|
||||
Note that you may have to change the MinGW version number to match what you have installed. Eg. `C:/MinGW/lib/gcc/mingw32/5.3.0/` instead of `C:/MinGW/lib/gcc/mingw32/6.3.0/`.
|
||||
|
||||
```
|
||||
```json
|
||||
{
|
||||
"configurations": [
|
||||
{
|
||||
|
@ -39,9 +39,9 @@ Note that you may have to change the MinGW version number to match what you have
|
|||
|
||||
The `includePath` above includes the system header paths that gcc uses in version 6.3.0 for C++ projects and matches the output of `gcc -v -E -x c++ -`. The `intelliSenseMode` should be set to **"clang-x64"** to get MinGW projects to work properly with IntelliSense. The `__GNUC__=#` define should match the major version of the toolchain in your installation (6 in this example).
|
||||
|
||||
For C projects, simply remove the c++ lines:
|
||||
For C projects, simply remove the C++ lines:
|
||||
|
||||
```
|
||||
```json
|
||||
{
|
||||
"configurations": [
|
||||
{
|
||||
|
|
|
@ -6,7 +6,7 @@ Select "C/Cpp: Edit Configurations" from the command palette to create the **c_c
|
|||
|
||||
## Release
|
||||
|
||||
For developers using Ubuntu with the current version of WSL released with the Fall Creators Update, you can add the following configuration template to your **c_cpp_properties.json** file.
|
||||
For developers using Ubuntu with the current version of WSL released with the Fall Creators Update, you can add the following configuration template to your **c_cpp_properties.json** file.
|
||||
|
||||
```json
|
||||
{
|
||||
|
@ -45,7 +45,7 @@ For developers using Ubuntu with the current version of WSL released with the Fa
|
|||
|
||||
The `includePath` above includes the system header paths that gcc uses for C++ projects and matches the output of `gcc -v -E -x c++ - < /dev/null`. The intelliSenseMode should be set to **"clang-x64"** to get WSL projects to work properly with IntelliSense.
|
||||
|
||||
Note that `${localappdata}/Packages/CanonicalGroupLimited.UbuntuonWindows_79rhkp1fndgsc/LocalState/rootfs/` is the path to the root of the Ubuntu filesystem. This will be different if you are using a different distro. You can discover the paths to your distro's filesystem by using this handy Powershell command:
|
||||
Note that `${localappdata}/Packages/CanonicalGroupLimited.UbuntuonWindows_79rhkp1fndgsc/LocalState/rootfs/` is the path to the root of the Ubuntu filesystem. This will be different if you are using a different distro. You can discover the paths to your distro's filesystem by using this handy PowerShell command:
|
||||
|
||||
```Powershell
|
||||
PS R:\> ($(get-appxpackage).PackageFamilyName | findstr /i 'SUSE Ubuntu') -replace '^', "$`{localappdata`}/Packages/"
|
||||
|
@ -55,7 +55,7 @@ ${localappdata}/Packages/46932SUSE.openSUSELeap42.2_022rs5jcyhyac
|
|||
${localappdata}/Packages/46932SUSE.SUSELinuxEnterpriseServer12SP2_022rs5jcyhyac
|
||||
```
|
||||
|
||||
For C projects, simply remove the c++ lines:
|
||||
For C projects, simply remove the C++ lines:
|
||||
|
||||
```json
|
||||
{
|
||||
|
@ -130,10 +130,10 @@ The `includePath` above includes the system header paths that gcc uses for C++ p
|
|||
|
||||
Note that `${localappdata}/lxss/rootfs/` is the path to the root of the filesystem for Bash on Ubuntu on Windows.
|
||||
|
||||
For C projects, simply remove the c++ lines as in the previous example.
|
||||
For C projects, simply remove the C++ lines as in the previous example.
|
||||
|
||||
---
|
||||
|
||||
With these configurations, you should be all set up to use the new IntelliSense engine for linting, memberlist autocomplete, and quick info (tooltips). Add `"C_Cpp.intelliSenseEngine": "Default"` to your **settings.json** file to try out the new IntelliSense engine.
|
||||
|
||||
And remember to [heed the warnings of the Windows team about not creating or editing Linux files from a Windows app](https://blogs.msdn.microsoft.com/commandline/2016/11/17/do-not-change-linux-files-using-windows-apps-and-tools/)!
|
||||
And remember to [heed the warnings of the Windows team about not creating or editing Linux files from a Windows app](https://blogs.msdn.microsoft.com/commandline/2016/11/17/do-not-change-linux-files-using-windows-apps-and-tools/)!
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
# c_cpp_properties.json Reference Guide
|
||||
# `c_cpp_properties.json` Reference Guide
|
||||
|
||||
### Example:
|
||||
```
|
||||
### Example
|
||||
|
||||
```json
|
||||
{
|
||||
"configurations": [
|
||||
{
|
||||
|
@ -23,30 +24,41 @@
|
|||
|
||||
## Top-level properties
|
||||
|
||||
**configurations**: An array of configuration objects that provide the IntelliSense engine with information about your project and your preferences. By default, the extension creates 3 configurations for you, one each for Linux, Mac, and Windows, but it is not required to keep them all. You may also add additional configurations if necessary.
|
||||
* #### `configurations`
|
||||
An array of configuration objects that provide the IntelliSense engine with information about your project and your preferences. By default, the extension creates 3 configurations for you, one each for Linux, Mac, and Windows, but it is not required to keep them all. You may also add additional configurations if necessary.
|
||||
|
||||
**version**: We recommend you don't edit this field. It tracks the current version of the c_cpp_properties.json file so that the extension knows what properties and settings should be present and how to upgrade this file to the latest version.
|
||||
* #### `version`
|
||||
We recommend you don't edit this field. It tracks the current version of the **c_cpp_properties.json** file so that the extension knows what properties and settings should be present and how to upgrade this file to the latest version.
|
||||
|
||||
## Configuration properties
|
||||
|
||||
**name**: A friendly name for the configuration. "Linux", "Mac", and "Win32" are special names that instruct the extension to load that configuration by default on the associated operating system unless additional configurations have been created. The status bar in VS Code will show you which configuration is active. You can also click on the label in the status bar to change the active configuration.
|
||||
* #### `name`
|
||||
A friendly name for the configuration. "Linux", "Mac", and "Win32" are special names that instruct the extension to load that configuration by default on the associated operating system unless additional configurations have been created. The status bar in VS Code will show you which configuration is active. You can also click on the label in the status bar to change the active configuration.
|
||||
|
||||
**intelliSenseMode**: If `"C_Cpp.intelliSenseEngine"` is set to "Default" in your settings file, this property determines which mode the IntelliSense engine will run in. `"msvc-x64"` maps to Visual Studio mode with 64-bit pointer sizes. `"clang-x64"` maps to GCC/CLang mode with 64-bit pointer sizes. Windows uses `"msvc-x64"` by default and Linux/Mac use `"clang-x64"` by default.
|
||||
* #### `intelliSenseMode`
|
||||
If `"C_Cpp.intelliSenseEngine"` is set to "Default" in your settings file, this property determines which mode the IntelliSense engine will run in. `"msvc-x64"` maps to Visual Studio mode with 64-bit pointer sizes. `"clang-x64"` maps to GCC/CLang mode with 64-bit pointer sizes. Windows uses `"msvc-x64"` by default and Linux/Mac use `"clang-x64"` by default.
|
||||
|
||||
**includePath**: If `"C_Cpp.intelliSenseEngine"` is set to "Default" in your settings file, this list of paths will be used by IntelliSense to search for headers included by your source files. This is basically the same as the list of paths you pass to your compiler with the `-I` switch; the IntelliSense engine will not do a recursive search in these paths for includes.
|
||||
* #### `includePath`
|
||||
If `"C_Cpp.intelliSenseEngine"` is set to "Default" in your settings file, this list of paths will be used by IntelliSense to search for headers included by your source files. This is basically the same as the list of paths you pass to your compiler with the `-I` switch; the IntelliSense engine will not do a recursive search in these paths for includes.
|
||||
|
||||
**defines**: If `"C_Cpp.intelliSenseEngine"` is set to "Default" in your settings file, this list of preprocessor symbols will be used by IntelliSense during the compilation of your source files. This is basically the same as the list of symbols you pass to your compiler with the `-D` switch.
|
||||
* #### `defines`
|
||||
If `"C_Cpp.intelliSenseEngine"` is set to "Default" in your settings file, this list of preprocessor symbols will be used by IntelliSense during the compilation of your source files. This is basically the same as the list of symbols you pass to your compiler with the `-D` switch.
|
||||
|
||||
**compileCommands** (optional): If `"C_Cpp.intelliSenseEngine"` is set to "Default" in your settings file, the includes and defines discovered in this file will be used instead of the values set for `includePath` and `defines`. If the compile commands datasbase does not contain an entry for the translation unit that corresponds to the file you opened in the editor, then a warning message will appear and the extension will use the `includePath` and `defines` settings instead.
|
||||
* #### `compileCommands` (optional)
|
||||
If `"C_Cpp.intelliSenseEngine"` is set to "Default" in your settings file, the includes and defines discovered in this file will be used instead of the values set for `includePath` and `defines`. If the compile commands database does not contain an entry for the translation unit that corresponds to the file you opened in the editor, then a warning message will appear and the extension will use the `includePath` and `defines` settings instead.
|
||||
|
||||
*For more information about the file format, see the [Clang documentation](https://clang.llvm.org/docs/JSONCompilationDatabase.html). Some build systems, such as CMake, [simplify generating this file](https://cmake.org/cmake/help/v3.5/variable/CMAKE_EXPORT_COMPILE_COMMANDS.html).*
|
||||
|
||||
**browse**: The set of properties used when `"C_Cpp.intelliSenseEngine"` is set to `"Tag Parser"` (also referred to as "fuzzy" IntelliSense, or the "browse" engine). These properties are also used by the Go To Definition/Declaration features, or when the "Default" IntelliSense engine is unable to resolve `#include`s in your source files.
|
||||
* #### `browse`
|
||||
The set of properties used when `"C_Cpp.intelliSenseEngine"` is set to `"Tag Parser"` (also referred to as "fuzzy" IntelliSense, or the "browse" engine). These properties are also used by the Go To Definition/Declaration features, or when the "Default" IntelliSense engine is unable to resolve the #includes in your source files.
|
||||
|
||||
### Browse properties
|
||||
|
||||
**path**: This list of paths will be used by the Tag Parser to search for headers included by your source files. The Tag Parser will automatically search all subfolders in these paths unless the path ends with a `/*` or `\*`. For example, `/usr/include` directs the Tag Parser to search the `include` folder and its subfolders for headers while `/usr/include/*` directs the Tag Parser not to look in any subfolders of `/usr/include`.
|
||||
* #### `path`
|
||||
This list of paths will be used by the Tag Parser to search for headers included by your source files. The Tag Parser will automatically search all subfolders in these paths unless the path ends with a `/*` or `\*`. For example, `/usr/include` directs the Tag Parser to search the `include` folder and its subfolders for headers while `/usr/include/*` directs the Tag Parser not to look in any subfolders of `/usr/include`.
|
||||
|
||||
**limitSymbolsToIncludedHeaders**: When true, the Tag Parser will only parse code files that have been directly or indirectly included by a source file in the ${workspaceRoot}. When false, the Tag Parser will parse all code files found in the paths specified in the **path** list.
|
||||
* #### `limitSymbolsToIncludedHeaders`
|
||||
When true, the Tag Parser will only parse code files that have been directly or indirectly included by a source file in `${workspaceRoot}`. When false, the Tag Parser will parse all code files found in the paths specified in the **path** list.
|
||||
|
||||
**databaseFilename**: When set, this instructs the extension to save the Tag Parser's symbol database somewhere other than the workspace's default storage location. If a relative path is specified, it will be made relative to the workspace's default storage location, not the workspace folder itself. The ${workspaceRoot} variable can be used to specify a path relative to the workspace folder (e.g. $[workspaceRoot}/.vscode/browse.vc.db)
|
||||
* #### `databaseFilename`
|
||||
When set, this instructs the extension to save the Tag Parser's symbol database somewhere other than the workspace's default storage location. If a relative path is specified, it will be made relative to the workspace's default storage location, not the workspace folder itself. The `${workspaceRoot}` variable can be used to specify a path relative to the workspace folder (e.g. `$[workspaceRoot}/.vscode/browse.vc.db`)
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
"args": ["--extensionDevelopmentPath=${workspaceRoot}" ],
|
||||
"stopOnEntry": false,
|
||||
"sourceMaps": true,
|
||||
"outDir": "${workspaceRoot}/out/src",
|
||||
"outFiles": ["${workspaceRoot}/out/src"],
|
||||
"preLaunchTask": "npm"
|
||||
},
|
||||
{
|
||||
|
@ -21,7 +21,7 @@
|
|||
"args": ["--extensionDevelopmentPath=${workspaceRoot}", "--extensionTestsPath=${workspaceRoot}/out/test" ],
|
||||
"stopOnEntry": false,
|
||||
"sourceMaps": true,
|
||||
"outDir": "${workspaceRoot}/out/test",
|
||||
"outFiles": ["${workspaceRoot}/out/test"],
|
||||
"preLaunchTask": "npm"
|
||||
},
|
||||
{
|
||||
|
|
|
@ -1,6 +1,22 @@
|
|||
# C/C++ for Visual Studio Code Change Log
|
||||
|
||||
## Version 0.14.6: Janurary 17, 2017
|
||||
## Version 0.15.0: February 15, 2018
|
||||
* Add colorization for inactive regions. [#1466](https://github.com/Microsoft/vscode-cpptools/issues/1466)
|
||||
* Fix 3 highest hitting crashes. [#1137](https://github.com/Microsoft/vscode-cpptools/issues/1137), [#1337](https://github.com/Microsoft/vscode-cpptools/issues/1337), [#1497](https://github.com/Microsoft/vscode-cpptools/issues/1497)
|
||||
* Update IntelliSense compiler (bug fixes and more C++17 support). [#1067](https://github.com/Microsoft/vscode-cpptools/issues/1067), [#1313](https://github.com/Microsoft/vscode-cpptools/issues/1313), [#1461](https://github.com/Microsoft/vscode-cpptools/issues/1461)
|
||||
* Fix duplicate `cannot open source file` errors. [#1469](https://github.com/Microsoft/vscode-cpptools/issues/1469)
|
||||
* Fix `Go to Symbol in File...` being slow for large workspaces. [#1472](https://github.com/Microsoft/vscode-cpptools/issues/1472)
|
||||
* Fix stuck processes during shutdown. [#1474](https://github.com/Microsoft/vscode-cpptools/issues/1474)
|
||||
* Fix error popup appearing with non-workspace files when using `compile_commands.json`. [#1475](https://github.com/Microsoft/vscode-cpptools/issues/1475)
|
||||
* Fix snippet completions being blocked after `#`. [#1531](https://github.com/Microsoft/vscode-cpptools/issues/1531)
|
||||
* Add more macros to `cpp.hint` (fixing missing symbols).
|
||||
* Add `__CHAR_BIT__=8` to default defines on Mac. [#1510](https://github.com/Microsoft/vscode-cpptools/issues/1510)
|
||||
* Added support for config variables to `c_cpp_properties.json`. [#314](https://github.com/Microsoft/vscode-cpptools/issues/314)
|
||||
* Joshua Cannon (@thejcannon) [PR #1529](https://github.com/Microsoft/vscode-cpptools/pull/1529)
|
||||
* Define `_UNICODE` by default on Windows platforms. [#1538](https://github.com/Microsoft/vscode-cpptools/issues/1538)
|
||||
* Charles Milette (@sylveon) [PR #1540](https://github.com/Microsoft/vscode-cpptools/pull/1540)
|
||||
|
||||
## Version 0.14.6: January 17, 2018
|
||||
* Fix tag parser failing (and continuing to fail after edits) when it shouldn't. [#1367](https://github.com/Microsoft/vscode-cpptools/issues/1367)
|
||||
* Fix tag parser taking too long due to redundant processing. [#1288](https://github.com/Microsoft/vscode-cpptools/issues/1288)
|
||||
* Fix debugging silently failing the 1st time if a C/C++ file isn't opened. [#1366](https://github.com/Microsoft/vscode-cpptools/issues/1366)
|
||||
|
@ -52,7 +68,7 @@
|
|||
|
||||
## Version 0.14.1: November 9, 2017
|
||||
* Add support for multi-root workspaces. [#1070](https://github.com/Microsoft/vscode-cpptools/issues/1070)
|
||||
* Fix files temporarly being unsavable after Save As and other scenarios on Windows. [Microsoft/vscode#27329](https://github.com/Microsoft/vscode/issues/27329)
|
||||
* Fix files temporarily being unsavable after Save As and other scenarios on Windows. [Microsoft/vscode#27329](https://github.com/Microsoft/vscode/issues/27329)
|
||||
* Fix files "permanently" being unsavable if the IntelliSense process launches during tag parsing of the file. [#1040](https://github.com/Microsoft/vscode-cpptools/issues/1040)
|
||||
* Show pause and resume parsing commands after clicking the database icon. [#1141](https://github.com/Microsoft/vscode-cpptools/issues/1141)
|
||||
* Don't show the install output unless an error occurs. [#1160](https://github.com/Microsoft/vscode-cpptools/issues/1160)
|
||||
|
@ -75,7 +91,7 @@
|
|||
* Fix `limitSymbolsToIncludedHeaders` not working with single files. [#1109](https://github.com/Microsoft/vscode-cpptools/issues/1109)
|
||||
* Add logging to Output window. Errors will be logged by default. Verbosity is controlled by the `"C_Cpp.loggingLevel"` setting.
|
||||
* Add new database status bar icon for "Indexing" or "Parsing" with progress numbers, and the previous flame icon is now just for "Updating IntelliSense".
|
||||
* Stop showing `(Global Scope)` if there's actually an error in identifiying the correct scope.
|
||||
* Stop showing `(Global Scope)` if there's actually an error in identifying the correct scope.
|
||||
* Fix crash with the IntelliSense process when parsing certain template code (the most frequently hit crash).
|
||||
* Fix main thread being blocked while searching for files to remove after changing `files.exclude`.
|
||||
* Fix incorrect code action include path suggestion when a folder comes after "..".
|
||||
|
@ -266,7 +282,7 @@
|
|||
* Debugging for Visual C++ applications on Windows (Program Database files) is now available.
|
||||
* `clang-format` is now automatically installed as a part of the extension and formats code as you type.
|
||||
* `clang-format` options have been moved from c_cpp_properties.json file to settings.json (File->Preferences->User settings).
|
||||
* `clang-format` fall-back style is now set to 'Visual Studio'.
|
||||
* `clang-format` fallback style is now set to 'Visual Studio'.
|
||||
* Attach now requires a request type of `attach` instead of `launch`.
|
||||
* Support for additional console logging using the keyword `logging` inside `launch.json`.
|
||||
* Bug fixes.
|
||||
|
@ -300,7 +316,7 @@
|
|||
* Support for debugging with GDB on Cygwin.
|
||||
* Debugging on 32-bit Linux now enabled.
|
||||
* Format code using clang-format.
|
||||
* Experimental fuzzy autocompletion.
|
||||
* Experimental fuzzy auto-completion.
|
||||
* Bug fixes.
|
||||
|
||||
## Version 0.5.0: April 14, 2016
|
||||
|
|
|
@ -205,8 +205,8 @@
|
|||
<tr>
|
||||
<td>
|
||||
<div>
|
||||
<h2 class="caption">January 2018 Update</h2>
|
||||
<div>Thank you for installing the C/C++ extension. In the January update, we fixed a performance regression in the code browsing service (aka: Tag Parser). We also added the setting: <code>C_Cpp.workspaceParsingPriority</code> which allows you to control how aggressively the extension should index your workspace.<br />
|
||||
<h2 class="caption">February 2018 Update</h2>
|
||||
<div>Thank you for installing the C/C++ extension. In the February update, we added colorization around inactive preprocessor blocks. We also accepted our first pull requests from the community. Thanks for helping to make our extension better!<br />
|
||||
<br />
|
||||
Additional features and bug fixes are detailed in the <a href="https://github.com/Microsoft/vscode-cpptools/releases">full release notes</a>.</div>
|
||||
</div>
|
||||
|
@ -231,9 +231,9 @@
|
|||
<td>
|
||||
<div>
|
||||
<h3 class="caption">Blog Posts</h3>
|
||||
<div><a href="https://blogs.msdn.microsoft.com/vcblog/2018/01/17/visual-studio-code-cc-extension-jan-2018-update/">January 2018 Update</a></div>
|
||||
<div><a href="https://blogs.msdn.microsoft.com/vcblog/2017/12/11/visual-studio-code-cc-extension-dec-2017-update-support-for-more-linux-distros/">December 2017 Update</a></div>
|
||||
<div><a href="https://blogs.msdn.microsoft.com/vcblog/2017/11/09/visual-studio-code-cc-extension-nov-2017-update-multi-root-workspaces-support-is-here/">November 2017 Update</a></div>
|
||||
<div><a href="https://blogs.msdn.microsoft.com/vcblog/2017/10/20/visual-studio-code-cc-extension-october-2017-update/">October 2017 Update</a></div>
|
||||
<div><a href="https://blogs.msdn.microsoft.com/vcblog/2016/03/31/cc-extension-for-visual-studio-code/">C/C++ Extension anouncement</a></div>
|
||||
</div>
|
||||
</td>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
"--clang",
|
||||
"--pack_alignment",
|
||||
"8",
|
||||
"--framework_include_directory=/System/Library/Frameworks"
|
||||
"-D__CHAR_BIT__=8"
|
||||
],
|
||||
"defaults_op" : "merge"
|
||||
}
|
|
@ -6,6 +6,8 @@
|
|||
"--rtti",
|
||||
"--edge",
|
||||
"--exceptions",
|
||||
"--error_limit",
|
||||
"25000",
|
||||
"-D_EDG_COMPILER",
|
||||
"-D_USE_DECLSPECS_FOR_SAL=1"
|
||||
],
|
||||
|
|
|
@ -561,12 +561,14 @@
|
|||
|
||||
// Miscellaneous
|
||||
#define __RPC_FAR
|
||||
#define CONST const
|
||||
#define CALLBACK
|
||||
#define EXPORT
|
||||
#define FAR
|
||||
#define far
|
||||
#define FASTCALL __fastcall
|
||||
#define NEAR
|
||||
#define near
|
||||
#define PASCAL
|
||||
#define SIZE_T_MAX UINT_MAX
|
||||
#define UNALIGNED
|
||||
|
@ -674,6 +676,8 @@
|
|||
#define PURE = 0
|
||||
#define STDMETHOD(method) virtual HRESULT STDMETHODCALLTYPE method
|
||||
#define STDMETHOD_(type,method) virtual type STDMETHODCALLTYPE method
|
||||
#define STDMETHODV(method) HRESULT (STDMETHODVCALLTYPE * method)
|
||||
#define STDMETHODV_(type,method) type (STDMETHODVCALLTYPE * method)
|
||||
#define STDMETHODCALLTYPE __stdcall
|
||||
#define STDMETHODIMP_(type) type STDMETHODCALLTYPE
|
||||
#define STDMETHODIMP HRESULT STDMETHODCALLTYPE
|
||||
|
@ -693,11 +697,39 @@
|
|||
#define TEXT(name) name
|
||||
#define WINAPI __stdcall
|
||||
#define importlib(name)
|
||||
#define DECLSPEC_IMPORT
|
||||
#define DECLSPEC_NORETURN
|
||||
#define DECLSPEC_NOTHROW
|
||||
#define DECLSPEC_ALIGN(x)
|
||||
#define DECLSPEC_UUID(x)
|
||||
#define DECLSPEC_NOVTABLE
|
||||
#define DECLSPEC_SELECTANY
|
||||
#define DECLSPEC_ADDRSAFE
|
||||
#define DECLSPEC_CACHEALIGN
|
||||
#define DECLSPEC_SAFEBUFFERS
|
||||
#define DECLSPEC_NOINLINE
|
||||
#define DECLSPEC_GUARDNOCF
|
||||
#define DECLSPEC_GUARD_SUPPRESS
|
||||
#define DECLSPEC_CHPE_GUEST
|
||||
#define DECLSPEC_CHPE_PATCHABLE
|
||||
#define DECLSPEC_DEPRECATED
|
||||
#define DECLSPEC_DEPRECATED_DDK
|
||||
#define __allowed(p)
|
||||
#define __in_data_source(src_sym)
|
||||
#define __out_data_source(src_sym)
|
||||
#define __field_data_source(src_sym)
|
||||
#define __this_out_data_source(src_syn)
|
||||
#define _VARIANT_BOOL
|
||||
#define RPCNSAPI
|
||||
|
||||
// C++ Standard Library
|
||||
#define _STD_BEGIN namespace std {
|
||||
#define _STD_END } ;
|
||||
#define _STD std::
|
||||
#define _STD_BEGIN namespace std {
|
||||
#define _STD_END }
|
||||
#define _STD ::std::
|
||||
#define _STDEXT_BEGIN namespace stdext {
|
||||
#define _STDEXT_END }
|
||||
#define _STDEXT ::stdext::
|
||||
#define _CSTD ::
|
||||
#define _TRY_BEGIN try {
|
||||
#define _CATCH(x) } catch (x) {
|
||||
#define _CATCH_ALL } catch (...) {
|
||||
|
@ -719,6 +751,51 @@
|
|||
#define _CATCH_IO_(x)
|
||||
#define _NOEXCEPT
|
||||
|
||||
#define _W64
|
||||
#define _ADVSIMD_ALIGN(x)
|
||||
#define IVEC_LOGICALS(vect,element)
|
||||
#define IVEC_ADD_SUB(vect,element,opsize)
|
||||
#define IVEC_SELECT(vect12,vect34,element,selop)
|
||||
#define IVEC128_LOGICALS(vect,element)
|
||||
#define IVEC128_ADD_SUB(vect,element,opsize)
|
||||
#define IVEC128_SELECT(vect12,vect34,element,selop)
|
||||
#define F64vec2_COMP(op)
|
||||
#define F64vec2_COMI(op)
|
||||
#define F64vec2_SELECT(op)
|
||||
#define F64vec2_UCOMI(op)
|
||||
#define Fvec32s4_SELECT(op)
|
||||
#define Fvec32s4_COMP(op)
|
||||
#define Fvec32s1_SELECT(op)
|
||||
#define Fvec32s1_COMP(op)
|
||||
#define _FS_DLL
|
||||
#define _CMPLX(T) complex<T >
|
||||
#define _CTR(T) _Ctraits<T >
|
||||
#define _TMPLT(T) template<class T >
|
||||
#define _OMPIMP
|
||||
#define _RTCINTERNAL_DEPRECATED
|
||||
#define _NON_MEMBER_CALL(FUNC, CV_OPT, REF_OPT, NOEXCEPT_OPT)
|
||||
#define _NON_MEMBER_CALL_CV(FUNC, REF_OPT, NOEXCEPT_OPT)
|
||||
#define _NON_MEMBER_CALL_CV_REF(FUNC, NOEXCEPT_OPT)
|
||||
#define _NON_MEMBER_CALL_CV_REF_NOEXCEPT(FUNC)
|
||||
#define _CLASS_DEFINE_CV_REF_NOEXCEPT(CLASS)
|
||||
#define _GENERIC_MATH1R(FUN, RET, CRTTYPE)
|
||||
#define _GENERIC_MATH1(FUN, CRTTYPE)
|
||||
#define _GENERIC_MATH1X(FUN, ARG2, CRTTYPE)
|
||||
#define _GENERIC_MATH2_CALL(FUN, CRTTYPE, CALL_OPT)
|
||||
#define _GENERIC_MATH2(FUN, CRTTYPE)
|
||||
#define _IMPLEMENT_INVOKE(NAME_PREFIX, CONSTEXPR)
|
||||
#define _GENERIC_MATHC0X(FUN, VAL)
|
||||
#define _GENERIC_MATHC1X(FUN, VAL)
|
||||
#define _MEMBER_CALL(FUNC, CV_OPT, REF_OPT, NOEXCEPT_OPT)
|
||||
#define _MEMBER_CALL_CV(FUNC, REF_OPT, NOEXCEPT_OPT)
|
||||
#define _MEMBER_CALL_CV_REF(FUNC, NOEXCEPT_OPT)
|
||||
#define _MEMBER_CALL_CV_REF_NOEXCEPT(FUNC)
|
||||
#define _CLASS_DEFINE_CONST(CLASS)
|
||||
#define _CLASS_DEFINE_CV(CLASS)
|
||||
#define _CLASS_DEFINE_CV_REF_NOEXCEPT(CLASS)
|
||||
#define _COLLECTION_ATTRIBUTES
|
||||
#define _COLLECTION_TRANSLATE } catch (const ::std::bad_alloc&) { throw ref new OutOfMemoryException; } catch (const ::std::exception&) { throw ref new FailureException; }
|
||||
|
||||
// CRT
|
||||
#define __CRTDECL
|
||||
#define __CLR_OR_THIS_CALL
|
||||
|
@ -745,6 +822,62 @@
|
|||
#define _MRTIMP
|
||||
#define _SWPRINTFS_DEPRECATED
|
||||
|
||||
#define _ACRTIMP
|
||||
#define _ACRTIMP_ALT
|
||||
#define _CRTALLOCATOR
|
||||
#define _CRT_BEGIN_C_HEADER
|
||||
#define _CRT_END_C_HEADER
|
||||
#define _CRT_STDIO_INLINE
|
||||
#define _CRT_UNUSED(x)
|
||||
#define _DCRTIMP
|
||||
#define _NO_CRT_STDIO_INLINE
|
||||
#define _WCSTOK_DEPRECATED
|
||||
#define _CONCRTIMP
|
||||
#define _MRTIMP2
|
||||
#define _MRTIMP2_NPURE
|
||||
#define _MRTIMP2_PURE_NPURE
|
||||
#define _CRT_GUARDOVERFLOW
|
||||
#define _CRT_HYBRIDPATCHABLE
|
||||
#define _CRT_MANAGED_FP_DEPRECATE
|
||||
#define _BEGIN_PRAGMA_OPTIMIZE_ENABLE(flags, bug, reason)
|
||||
#define _BEGIN_PRAGMA_OPTIMIZE_DISABLE(flags, bug, reason)
|
||||
#define _END_PRAGMA_OPTIMIZE()
|
||||
#define _PGLOBAL
|
||||
#define RPCRTAPI
|
||||
|
||||
// yvals
|
||||
#define _INLINE_VAR
|
||||
#define _CONSTEXPR17
|
||||
#define _NOEXCEPT_COND(...)
|
||||
#define _NOEXCEPT_OPER(...)
|
||||
#define _EXTERN_C extern "C" {
|
||||
#define _END_EXTERN_C }
|
||||
#define _CRTIMP2_PURE_IMPORT
|
||||
#define _CRTDATA2_IMPORT
|
||||
#define _CRTIMP2_NCEEPURE_IMPORT
|
||||
#define _NODISCARD
|
||||
#define _DECLSPEC_ALLOCATOR
|
||||
#define _DEPRECATE_TR1_NAMESPACE
|
||||
#define _DEPRECATE_TR2_SYS_NAMESPACE
|
||||
#define _DEPRECATE_IDENTITY_STRUCT
|
||||
#define _CXX17_DEPRECATE_C_HEADER
|
||||
#define _CXX17_DEPRECATE_STRSTREAM
|
||||
#define _CXX17_DEPRECATE_UNCAUGHT_EXCEPTION
|
||||
#define _CXX17_DEPRECATE_ADAPTOR_TYPEDEFS
|
||||
#define _CXX17_DEPRECATE_NEGATORS
|
||||
#define _CXX17_DEPRECATE_ALLOCATOR_VOID
|
||||
#define _CXX17_DEPRECATE_OLD_ALLOCATOR_MEMBERS
|
||||
#define _CXX17_DEPRECATE_RAW_STORAGE_ITERATOR
|
||||
#define _CXX17_DEPRECATE_TEMPORARY_BUFFER
|
||||
#define _CXX17_DEPRECATE_IS_LITERAL_TYPE
|
||||
#define _CXX17_DEPRECATE_RESULT_OF
|
||||
#define _CXX17_DEPRECATE_ITERATOR_BASE_CLASS
|
||||
#define _CXX17_DEPRECATE_SHARED_PTR_UNIQUE
|
||||
#define _CXX17_DEPRECATE_CODECVT_HEADER
|
||||
#define _EXPERIMENTAL_PARALLEL_ALGORITHMS
|
||||
#define __PURE_APPDOMAIN_GLOBAL
|
||||
#define _SCL_INSECURE_DEPRECATE_FN(_Func)
|
||||
|
||||
#define __DEFINE_CPP_OVERLOAD_SECURE_FUNC_0_0(_ReturnType, _FuncName, _DstType, _Dst) template <size_t _Size> _ReturnType _FuncName(_DstType (&_Dst)[_Size]);
|
||||
#define __DEFINE_CPP_OVERLOAD_SECURE_FUNC_0_1(_ReturnType, _FuncName, _DstType, _Dst, _TType1, _TArg1) template <size_t _Size> _ReturnType _FuncName(_DstType (&_Dst)[_Size], _TType1 _TArg1);
|
||||
#define __DEFINE_CPP_OVERLOAD_SECURE_FUNC_0_2(_ReturnType, _FuncName, _DstType, _Dst, _TType1, _TArg1, _TType2, _TArg2) template <size_t _Size> _ReturnType _FuncName(_DstType (&_Dst)[_Size], _TType1 _TArg1, _TType2 _TArg2);
|
||||
|
@ -780,6 +913,57 @@
|
|||
#define __DECLARE_CPP_OVERLOAD_INLINE_NFUNC_0_3_EX(_ReturnType, _ReturnPolicy, _FuncName, _SecureFuncName, _SecureDstType, _DstType, _Dst, _TType1, _TArg1, _TType2, _TArg2, _TType3, _TArg3) _ReturnType __CRTDECL _FuncName(_DstType *_Dst, _TType1 _TArg1, _TType2 _TArg2, _TType3 _TArg3)
|
||||
#define __DEFINE_CPP_OVERLOAD_INLINE_NFUNC_0_3_EX(_ReturnType, _ReturnPolicy, _FuncName, _SecureFuncName, _SecureDstType, _SalAttributeDst, _DstType, _Dst, _TType1, _TArg1, _TType2, _TArg2, _TType3, _TArg3)
|
||||
|
||||
#define __DEFINE_CPP_OVERLOAD_STANDARD_FUNC_0_0(_ReturnType, _ReturnPolicy, _DeclSpec, _FuncName, _SalAttributeDst, _DstType, _Dst)
|
||||
#define __DEFINE_CPP_OVERLOAD_STANDARD_FUNC_0_1(_ReturnType, _ReturnPolicy, _DeclSpec, _FuncName, _SalAttributeDst, _DstType, _Dst, _TType1, _TArg1)
|
||||
#define __DEFINE_CPP_OVERLOAD_STANDARD_FUNC_0_2(_ReturnType, _ReturnPolicy, _DeclSpec, _FuncName, _SalAttributeDst, _DstType, _Dst, _TType1, _TArg1, _TType2, _TArg2)
|
||||
#define __DEFINE_CPP_OVERLOAD_STANDARD_FUNC_0_3(_ReturnType, _ReturnPolicy, _DeclSpec, _FuncName, _SalAttributeDst, _DstType, _Dst, _TType1, _TArg1, _TType2, _TArg2, _TType3, _TArg3)
|
||||
#define __DEFINE_CPP_OVERLOAD_STANDARD_FUNC_0_4(_ReturnType, _ReturnPolicy, _DeclSpec, _FuncName, _SalAttributeDst, _DstType, _Dst, _TType1, _TArg1, _TType2, _TArg2, _TType3, _TArg3, _TType4, _TArg4)
|
||||
#define __DEFINE_CPP_OVERLOAD_STANDARD_FUNC_1_1(_ReturnType, _ReturnPolicy, _DeclSpec, _FuncName, _HType1, _HArg1, _SalAttributeDst, _DstType, _Dst, _TType1, _TArg1)
|
||||
#define __DEFINE_CPP_OVERLOAD_STANDARD_FUNC_2_0(_ReturnType, _ReturnPolicy, _DeclSpec, _FuncName, _HType1, _HArg1, _HType2, _HArg2, _SalAttributeDst, _DstType, _Dst)
|
||||
#define __DEFINE_CPP_OVERLOAD_STANDARD_FUNC_0_1_ARGLIST(_ReturnType, _ReturnPolicy, _DeclSpec, _CC, _FuncName, _VFuncName, _SalAttributeDst, _DstType, _Dst, _TType1, _TArg1)
|
||||
#define __DEFINE_CPP_OVERLOAD_STANDARD_FUNC_0_2_ARGLIST(_ReturnType, _ReturnPolicy, _DeclSpec, _CC, _FuncName, _VFuncName, _SalAttributeDst, _DstType, _Dst, _TType1, _TArg1, _TType2, _TArg2)
|
||||
#define __DEFINE_CPP_OVERLOAD_STANDARD_FUNC_0_2_SIZE(_DeclSpec, _FuncName, _SalAttributeDst, _DstType, _Dst, _TType1, _TArg1, _TType2, _TArg2)
|
||||
#define __DEFINE_CPP_OVERLOAD_STANDARD_FUNC_0_3_SIZE(_DeclSpec, _FuncName, _SalAttributeDst, _DstType, _Dst, _TType1, _TArg1, _TType2, _TArg2, _TType3, _TArg3)
|
||||
|
||||
#define __DEFINE_CPP_OVERLOAD_STANDARD_NFUNC_0_0(_ReturnType, _ReturnPolicy, _DeclSpec, _FuncName, _SalAttributeDst, _DstType, _Dst)
|
||||
#define __DEFINE_CPP_OVERLOAD_STANDARD_NFUNC_0_1(_ReturnType, _ReturnPolicy, _DeclSpec, _FuncName, _SalAttributeDst, _DstType, _Dst, _TType1, _TArg1)
|
||||
#define __DEFINE_CPP_OVERLOAD_STANDARD_NFUNC_0_2(_ReturnType, _ReturnPolicy, _DeclSpec, _FuncName, _SalAttributeDst, _DstType, _Dst, _TType1, _TArg1, _TType2, _TArg2)
|
||||
#define __DEFINE_CPP_OVERLOAD_STANDARD_NFUNC_0_3(_ReturnType, _ReturnPolicy, _DeclSpec, _FuncName, _SalAttributeDst, _DstType, _Dst, _TType1, _TArg1, _TType2, _TArg2, _TType3, _TArg3)
|
||||
#define __DEFINE_CPP_OVERLOAD_STANDARD_NFUNC_0_4(_ReturnType, _ReturnPolicy, _DeclSpec, _FuncName, _SalAttributeDst, _DstType, _Dst, _TType1, _TArg1, _TType2, _TArg2, _TType3, _TArg3, _TType4, _TArg4)
|
||||
#define __DEFINE_CPP_OVERLOAD_STANDARD_NFUNC_1_1(_ReturnType, _ReturnPolicy, _DeclSpec, _FuncName, _HType1, _HArg1, _SalAttributeDst, _DstType, _Dst, _TType1, _TArg1)
|
||||
#define __DEFINE_CPP_OVERLOAD_STANDARD_NFUNC_2_0(_ReturnType, _ReturnPolicy, _DeclSpec, _FuncName, _HType1, _HArg1, _HType2, _HArg2, _SalAttributeDst, _DstType, _Dst)
|
||||
#define __DEFINE_CPP_OVERLOAD_STANDARD_NFUNC_0_1_ARGLIST(_ReturnType, _ReturnPolicy, _DeclSpec, _FuncName, _VFuncName, _SalAttributeDst, _DstType, _Dst, _TType1, _TArg1)
|
||||
#define __DEFINE_CPP_OVERLOAD_STANDARD_NFUNC_0_2_SIZE(_DeclSpec, _FuncName, _SalAttributeDst, _DstType, _Dst, _TType1, _TArg1, _TType2, _TArg2)
|
||||
#define __DEFINE_CPP_OVERLOAD_STANDARD_NFUNC_0_3_SIZE(_DeclSpec, _FuncName, _SalAttributeDst, _DstType, _Dst, _TType1, _TArg1, _TType2, _TArg2, _TType3, _TArg3)
|
||||
|
||||
#define __DECLARE_CPP_OVERLOAD_INLINE_FUNC_0_0_EX(_ReturnType, _ReturnPolicy, _FuncName, _SecureFuncName, _SecureDstType, _DstType, _Dst)
|
||||
#define __DEFINE_CPP_OVERLOAD_INLINE_FUNC_0_0_EX(_ReturnType, _ReturnPolicy, _FuncName, _SecureFuncName, _SecureDstType, _DstType, _Dst)
|
||||
#define __DECLARE_CPP_OVERLOAD_INLINE_FUNC_0_1_EX(_ReturnType, _ReturnPolicy, _FuncName, _SecureFuncName, _SecureDstType, _DstType, _Dst, _TType1, _TArg1)
|
||||
#define __DEFINE_CPP_OVERLOAD_INLINE_FUNC_0_1_EX(_ReturnType, _ReturnPolicy, _FuncName, _SecureFuncName, _SecureDstType, _DstType, _Dst, _TType1, _TArg1)
|
||||
#define __DECLARE_CPP_OVERLOAD_INLINE_FUNC_0_2_EX(_ReturnType, _ReturnPolicy, _FuncName, _SecureFuncName, _SecureDstType, _DstType, _Dst, _TType1, _TArg1, _TType2, _TArg2)
|
||||
#define __DEFINE_CPP_OVERLOAD_INLINE_FUNC_0_2_EX(_ReturnType, _ReturnPolicy, _FuncName, _SecureFuncName, _SecureDstType, _SalAttributeDst, _DstType, _Dst, _TType1, _TArg1, _TType2, _TArg2)
|
||||
#define __DECLARE_CPP_OVERLOAD_INLINE_FUNC_0_3_EX(_ReturnType, _ReturnPolicy, _FuncName, _SecureFuncName, _SecureDstType, _DstType, _Dst, _TType1, _TArg1, _TType2, _TArg2, _TType3, _TArg3)
|
||||
#define __DEFINE_CPP_OVERLOAD_INLINE_FUNC_0_3_EX(_ReturnType, _ReturnPolicy, _FuncName, _SecureFuncName, _SecureDstType, _SalAttributeDst, _DstType, _Dst, _TType1, _TArg1, _TType2, _TArg2, _TType3, _TArg3)
|
||||
|
||||
#define __DEFINE_CPP_OVERLOAD_STANDARD_FUNC_0_0_EX(_ReturnType, _ReturnPolicy, _DeclSpec, _FuncName, _SecureFuncName, _SalAttributeDst, _DstType, _Dst)
|
||||
#define __DEFINE_CPP_OVERLOAD_STANDARD_FUNC_0_0_CGETS(_ReturnType, _DeclSpec, _FuncName, _SalAttributeDst, _DstType, _Dst)
|
||||
#define __DEFINE_CPP_OVERLOAD_STANDARD_FUNC_0_1_EX(_ReturnType, _ReturnPolicy, _DeclSpec, _FuncName, _SecureFuncName, _SecureDstType, _SalAttributeDst, _DstType, _Dst, _TType1, _TArg1)
|
||||
#define __DEFINE_CPP_OVERLOAD_STANDARD_FUNC_0_2_EX(_ReturnType, _ReturnPolicy, _DeclSpec, _FuncName, _SecureFuncName, _SecureDstType, _SalAttributeDst, _DstType, _Dst, _TType1, _TArg1, _TType2, _TArg2)
|
||||
#define __DEFINE_CPP_OVERLOAD_STANDARD_FUNC_0_3_EX(_ReturnType, _ReturnPolicy, _DeclSpec, _FuncName, _SecureFuncName, _SecureDstType, _SalAttributeDst, _DstType, _Dst, _TType1, _TArg1, _TType2, _TArg2, _TType3, _TArg3)
|
||||
#define __DEFINE_CPP_OVERLOAD_STANDARD_FUNC_0_4_EX(_ReturnType, _ReturnPolicy, _DeclSpec, _FuncName, _SecureFuncName, _SalAttributeDst, _DstType, _Dst, _TType1, _TArg1, _TType2, _TArg2, _TType3, _TArg3, _TType4, _TArg4)
|
||||
#define __DEFINE_CPP_OVERLOAD_STANDARD_FUNC_1_1_EX(_ReturnType, _ReturnPolicy, _DeclSpec, _FuncName, _SecureFuncName, _HType1, _HArg1, _SalAttributeDst, _DstType, _Dst, _TType1, _TArg1)
|
||||
#define __DEFINE_CPP_OVERLOAD_STANDARD_FUNC_2_0_EX(_ReturnType, _ReturnPolicy, _DeclSpec, _FuncName, _SecureFuncName, _HType1, _HArg1, _HType2, _HArg2, _SalAttributeDst, _DstType, _Dst)
|
||||
#define __DEFINE_CPP_OVERLOAD_STANDARD_FUNC_0_1_ARGLIST_EX(_ReturnType, _ReturnPolicy, _DeclSpec, _CC, _FuncName, _SecureFuncName, _VFuncName, _SecureVFuncName, _SalAttributeDst, _DstType, _Dst, _TType1, _TArg1)
|
||||
#define __DEFINE_CPP_OVERLOAD_STANDARD_FUNC_0_2_ARGLIST_EX(_ReturnType, _ReturnPolicy, _DeclSpec, _CC, _FuncName, _VFuncName, _SecureVFuncName, _SecureDstType, _SalAttributeDst, _DstType, _Dst, _TType1, _TArg1, _TType2, _TArg2)
|
||||
#define __DEFINE_CPP_OVERLOAD_STANDARD_FUNC_0_2_SIZE_EX(_DeclSpec, _FuncName, _SecureFuncName, _SecureDstType, _SalAttributeDst, _DstType, _Dst, _TType1, _TArg1, _TType2, _TArg2)
|
||||
#define __DEFINE_CPP_OVERLOAD_STANDARD_FUNC_0_3_SIZE_EX(_DeclSpec, _FuncName, _SecureFuncName, _SecureDstType, _SalAttributeDst, _DstType, _Dst, _TType1, _TArg1, _TType2, _TArg2, _TType3, _TArg3)
|
||||
|
||||
// VCRuntime
|
||||
#define _VCRTIMP
|
||||
#define _VCRT_ALLOCATOR
|
||||
#define _VCRT_ALIGN(x)
|
||||
#define _CRT_DEPRECATE_TEXT(_Text)
|
||||
|
||||
// Core Windows
|
||||
#define APIENTRY
|
||||
#define NTAPI
|
||||
|
@ -816,6 +1000,37 @@
|
|||
#define __MACHINE(X) X;
|
||||
#define __MACHINEWVMPURE(X) X;
|
||||
#define _INTERLOCKEDCALL __cdecl
|
||||
#define __MACHINEX86 __MACHINE
|
||||
#define __MACHINEX86_X64 __MACHINE
|
||||
#define __MACHINEARM __MACHINE
|
||||
#define __MACHINEARM64 __MACHINE
|
||||
#define __MACHINEARM_ARM64 __MACHINE
|
||||
#define __MACHINEARM_ARM64_X64 __MACHINE
|
||||
#define __MACHINEARM64_X64 __MACHINE
|
||||
#define __MACHINECHPEX86ARM64 __MACHINE
|
||||
|
||||
#define CFORCEINLINE
|
||||
#define STKFORCEINLINE
|
||||
#define PFORCEINLINE
|
||||
#define WINCRYPT_DWORD_CPP_ONLY
|
||||
#define DECLARE_INTERFACE_IID(iface, iid) interface DECLSPEC_UUID(iid) DECLSPEC_NOVTABLE iface
|
||||
#define DECLARE_INTERFACE_IID_(iface, baseiface, iid) interface DECLSPEC_UUID(iid) DECLSPEC_NOVTABLE iface : public baseiface
|
||||
#define WINGDIAPI
|
||||
#define WINSPOOLAPI
|
||||
#define WINOLECTLAPI_
|
||||
#define WINOLECTLAPI_(type)
|
||||
#define WINNORMALIZEAPI
|
||||
#define PROPSHEETPAGEA_V1_FIELDS
|
||||
#define PROPSHEETHEADERA_V1_FIELDS
|
||||
#define PROPSHEETPAGEW_V1_FIELDS
|
||||
#define PROPSHEETHEADERW_V1_FIELDS
|
||||
#define __WRAPPED__
|
||||
#define DEPRECATED(x)
|
||||
#define DEFINE_ENUM_FLAG_OPERATORS(ENUMTYPE)
|
||||
#define _ENUM_FLAG_CONSTEXPR
|
||||
|
||||
// WinRT
|
||||
#define ROAPI
|
||||
|
||||
// OLE
|
||||
#define BEGIN_INTERFACE
|
||||
|
@ -1843,6 +2058,137 @@
|
|||
#define _Check_return_opt_
|
||||
#define _Check_return_wat_
|
||||
|
||||
#define __ANNOTATION(fun)
|
||||
#define __inner_fallthrough
|
||||
#define __inner_fallthrough_dec
|
||||
#define __PRIMOP(type, fun)
|
||||
#define __QUALIFIER(fun)
|
||||
#define _In_function_class_(x)
|
||||
#define _Called_from_function_class_(x)
|
||||
#define _Function_class_(x)
|
||||
#define _Enum_is_bitflag_
|
||||
#define _Strict_type_match_
|
||||
#define _Maybe_raises_SEH_exception_
|
||||
#define _Raises_SEH_exception_
|
||||
#define __nothrow
|
||||
#define _Struct_size_bytes_(size)
|
||||
#define _SAL1_Source_(Name, args, annotes)
|
||||
#define _SAL1_1_Source_(Name, args, annotes)
|
||||
#define _SAL1_2_Source_(Name, args, annotes)
|
||||
#define _SAL2_Source_(Name, args, annotes)
|
||||
#define _SAL_L_Source_(Name, args, annotes)
|
||||
#define _SA_annotes0(n)
|
||||
#define _SA_annotes1(n,pp1)
|
||||
#define _SA_annotes2(n,pp1,pp2)
|
||||
#define _SA_annotes3(n,pp1,pp2,pp3)
|
||||
#define _Translates_Win32_to_HRESULT_(errorCode)
|
||||
#define __RETURN_POLICY_SAME(_FunctionCall)
|
||||
#define __RETURN_POLICY_DST(_FunctionCall)
|
||||
#define __RETURN_POLICY_VOID(_FunctionCall)
|
||||
#define __EMPTY_DECLSPEC
|
||||
#define __drv_allocatesMem(kind)
|
||||
#define __drv_freesMem(kind)
|
||||
#define __drv_preferredFunction(func,why)
|
||||
#define _Analysis_noreturn_
|
||||
#define _Guarded_by_(lock)
|
||||
#define _Write_guarded_by_(lock)
|
||||
#define _Interlocked_
|
||||
#define _Requires_lock_held_(lock)
|
||||
#define _Requires_exclusive_lock_held_(lock)
|
||||
#define _Requires_shared_lock_held_(lock)
|
||||
#define _Requires_lock_not_held_(lock)
|
||||
#define _Requires_no_locks_held_
|
||||
#define _Acquires_lock_(lock)
|
||||
#define _Acquires_exclusive_lock_(lock)
|
||||
#define _Acquires_shared_lock_(lock)
|
||||
#define _Releases_lock_(lock)
|
||||
#define _Releases_exclusive_lock_(lock)
|
||||
#define _Releases_shared_lock_(lock)
|
||||
#define _Acquires_nonreentrant_lock_(lock)
|
||||
#define _Releases_nonreentrant_lock_(lock)
|
||||
#define _Post_same_lock_(lock1,lock2)
|
||||
#define _Internal_set_lock_count_(lock, count)
|
||||
#define _Create_lock_level_(level)
|
||||
#define _Has_lock_level_(level)
|
||||
#define _Internal_lock_level_order_(a,b)
|
||||
#define _Csalcat1_(x,y)
|
||||
#define _Csalcat2_(x,y)
|
||||
#define _Lock_level_order_(a,b)
|
||||
#define _No_competing_thread_
|
||||
#define _Analysis_assume_lock_acquired_(lock)
|
||||
#define _Analysis_assume_lock_released_(lock)
|
||||
#define _Analysis_assume_lock_held_(lock)
|
||||
#define _Analysis_assume_lock_not_held_(lock)
|
||||
#define _Analysis_assume_same_lock_(lock1, lock2)
|
||||
#define _Function_ignore_lock_checking_(lock)
|
||||
#define _Analysis_suppress_lock_checking_(lock)
|
||||
#define _Benign_race_begin_ __pragma(warning(push))
|
||||
#define _Benign_race_end_ __pragma(warning(pop))
|
||||
#define _No_competing_thread_begin_
|
||||
#define _No_competing_thread_end_
|
||||
#define _Has_lock_kind_(kind)
|
||||
#define _Analysis_assume_
|
||||
#define _Analysis_assume_nullterminated_(s)
|
||||
#define _Analysis_mode_(m)
|
||||
#define _Function_class_(n)
|
||||
#define _Interlocked_operand_
|
||||
#define _IRQL_raises_(i)
|
||||
#define _IRQL_requires_(i)
|
||||
#define _IRQL_requires_max_(i)
|
||||
#define _IRQL_requires_min_(i)
|
||||
#define _IRQL_saves_
|
||||
#define _IRQL_saves_global_(k,s)
|
||||
#define _IRQL_restores_
|
||||
#define _IRQL_restores_global_(k,s)
|
||||
#define _IRQL_always_function_min_(i)
|
||||
#define _IRQL_always_function_max_(i)
|
||||
#define _IRQL_requires_same_
|
||||
#define _IRQL_uses_cancel_
|
||||
#define _IRQL_is_cancel_
|
||||
#define _Kernel_float_saved_
|
||||
#define _Kernel_float_restored_
|
||||
#define _Kernel_float_used_
|
||||
#define _Kernel_acquires_resource_(k)
|
||||
#define _Kernel_releases_resource_(k)
|
||||
#define _Kernel_requires_resource_held_(k)
|
||||
#define _Kernel_requires_resource_not_held_(k)
|
||||
#define _Kernel_clear_do_init_(yn)
|
||||
#define _Kernel_IoGetDmaAdapter_
|
||||
#define _Outref_result_buffer_(s)
|
||||
#define _Outref_result_bytebuffer_(s)
|
||||
#define _Outref_result_buffer_to_(s,c)
|
||||
#define _Outref_result_bytebuffer_to_(s,c)
|
||||
#define _Outref_result_buffer_all_(s)
|
||||
#define _Outref_result_bytebuffer_all_(s)
|
||||
#define _Outref_result_buffer_maybenull_(s)
|
||||
#define _Outref_result_bytebuffer_maybenull_(s)
|
||||
#define _Outref_result_buffer_to_maybenull_(s,c)
|
||||
#define _Outref_result_bytebuffer_to_maybenull_(s,c)
|
||||
#define _Outref_result_buffer_all_maybenull_(s)
|
||||
#define _Outref_result_bytebuffer_all_maybenull_(s)
|
||||
#define _In_defensive_(a)
|
||||
#define _Out_defensive_(a)
|
||||
#define _Inout_defensive_(a)
|
||||
#define _Acquires_nonreentrant_lock_(e)
|
||||
#define _Releases_nonreentrant_lock_(e)
|
||||
#define _Function_ignore_lock_checking_(e)
|
||||
#define _Analysis_suppress_lock_checking_(e)
|
||||
#define _Pre_readable_size_(s)
|
||||
#define _Pre_writable_size_(s)
|
||||
#define _Pre_readable_byte_size_(s)
|
||||
#define _Pre_writable_byte_size_(s)
|
||||
#define _Post_readable_size_(s)
|
||||
#define _Post_writable_size_(s)
|
||||
#define _Post_readable_byte_size_(s)
|
||||
#define _Post_writable_byte_size_(s)
|
||||
#define _Internal_create_CSAL_identifier_(id)
|
||||
#define _Reallocation_function_(after, before, size)
|
||||
#define _Ret_reallocated_bytes_(before, size)
|
||||
|
||||
// Code Analysis
|
||||
#define SA( id ) id
|
||||
#define REPEATABLE [repeatable]
|
||||
|
||||
// BOOST
|
||||
#define BOOST_TRY { try
|
||||
#define BOOST_CATCH(x) catch(x)
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "cpptools",
|
||||
"version": "0.14.6",
|
||||
"version": "0.15.0",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
|
@ -85,9 +85,14 @@
|
|||
"dev": true
|
||||
},
|
||||
"applicationinsights": {
|
||||
"version": "0.18.0",
|
||||
"resolved": "https://registry.npmjs.org/applicationinsights/-/applicationinsights-0.18.0.tgz",
|
||||
"integrity": "sha1-Fi67SKODQIvE3kTbMrQXMH9Fu8E="
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/applicationinsights/-/applicationinsights-1.0.1.tgz",
|
||||
"integrity": "sha1-U0Rrgw/o1dYZ7uKieLMdPSUDCSc=",
|
||||
"requires": {
|
||||
"diagnostic-channel": "0.2.0",
|
||||
"diagnostic-channel-publishers": "0.2.1",
|
||||
"zone.js": "0.7.6"
|
||||
}
|
||||
},
|
||||
"archy": {
|
||||
"version": "1.0.0",
|
||||
|
@ -719,6 +724,19 @@
|
|||
"integrity": "sha1-8NZtA2cqglyxtzvbP+YjEMjlUrc=",
|
||||
"dev": true
|
||||
},
|
||||
"diagnostic-channel": {
|
||||
"version": "0.2.0",
|
||||
"resolved": "https://registry.npmjs.org/diagnostic-channel/-/diagnostic-channel-0.2.0.tgz",
|
||||
"integrity": "sha1-zJmvlhLCP7H/8TYSxy8sv6qNWhc=",
|
||||
"requires": {
|
||||
"semver": "5.4.1"
|
||||
}
|
||||
},
|
||||
"diagnostic-channel-publishers": {
|
||||
"version": "0.2.1",
|
||||
"resolved": "https://registry.npmjs.org/diagnostic-channel-publishers/-/diagnostic-channel-publishers-0.2.1.tgz",
|
||||
"integrity": "sha1-ji1geottef6IC1SLxYzGvrKIxPM="
|
||||
},
|
||||
"diff": {
|
||||
"version": "3.3.1",
|
||||
"resolved": "https://registry.npmjs.org/diff/-/diff-3.3.1.tgz",
|
||||
|
@ -3954,8 +3972,7 @@
|
|||
"semver": {
|
||||
"version": "5.4.1",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-5.4.1.tgz",
|
||||
"integrity": "sha512-WfG/X9+oATh81XtllIo/I8gOiY9EXRdv1cQdyykeXK17YcUW3EXUAi2To4pcH6nZtJPr7ZOpM5OMyWJZm+8Rsg==",
|
||||
"dev": true
|
||||
"integrity": "sha512-WfG/X9+oATh81XtllIo/I8gOiY9EXRdv1cQdyykeXK17YcUW3EXUAi2To4pcH6nZtJPr7ZOpM5OMyWJZm+8Rsg=="
|
||||
},
|
||||
"sequencify": {
|
||||
"version": "0.0.7",
|
||||
|
@ -5118,12 +5135,11 @@
|
|||
"integrity": "sha1-28EOjX2VsQJyehmvPw/O9+JSsI4="
|
||||
},
|
||||
"vscode-extension-telemetry": {
|
||||
"version": "0.0.10",
|
||||
"resolved": "https://registry.npmjs.org/vscode-extension-telemetry/-/vscode-extension-telemetry-0.0.10.tgz",
|
||||
"integrity": "sha512-5yiT9MAsdipdTV+xUK485PKluNL40jqhTy94TGDweTO/ecPS/qy4qSaJGI9gaKBwpOr5oP6jiI8Bm3yIOjB/2w==",
|
||||
"version": "0.0.11",
|
||||
"resolved": "https://registry.npmjs.org/vscode-extension-telemetry/-/vscode-extension-telemetry-0.0.11.tgz",
|
||||
"integrity": "sha512-P1ALLofywtfpQy9TB5Sx2edp80fHXby+CGG5pq8P1vPL2zKIUjYy3eK8mFHCOGeljTf2PTTmXJ98DeBV0kCafQ==",
|
||||
"requires": {
|
||||
"applicationinsights": "0.18.0",
|
||||
"winreg": "1.2.3"
|
||||
"applicationinsights": "1.0.1"
|
||||
}
|
||||
},
|
||||
"vscode-jsonrpc": {
|
||||
|
@ -5162,11 +5178,6 @@
|
|||
"isexe": "2.0.0"
|
||||
}
|
||||
},
|
||||
"winreg": {
|
||||
"version": "1.2.3",
|
||||
"resolved": "https://registry.npmjs.org/winreg/-/winreg-1.2.3.tgz",
|
||||
"integrity": "sha1-k60RayaW2ofVj3JlqPzqUlSpZdU="
|
||||
},
|
||||
"wrappy": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
|
||||
|
@ -5202,6 +5213,11 @@
|
|||
"requires": {
|
||||
"buffer-crc32": "0.2.13"
|
||||
}
|
||||
},
|
||||
"zone.js": {
|
||||
"version": "0.7.6",
|
||||
"resolved": "https://registry.npmjs.org/zone.js/-/zone.js-0.7.6.tgz",
|
||||
"integrity": "sha1-+7w50+AmHQmG8boGMG6zrrDSIAk="
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
"name": "cpptools",
|
||||
"displayName": "C/C++",
|
||||
"description": "C/C++ IntelliSense, debugging, and code browsing.",
|
||||
"version": "0.14.6",
|
||||
"version": "0.15.0",
|
||||
"publisher": "ms-vscode",
|
||||
"preview": true,
|
||||
"icon": "LanguageCCPP_color_128x.png",
|
||||
|
@ -48,7 +48,7 @@
|
|||
"owner": "cpptools",
|
||||
"fileLocation": [
|
||||
"relative",
|
||||
"${workspaceRoot}"
|
||||
"${workspaceFolder}"
|
||||
],
|
||||
"pattern": {
|
||||
"regexp": "^(.*):(\\d+):(\\d+):\\s+(warning|error):\\s+(.*)$",
|
||||
|
@ -1073,14 +1073,14 @@
|
|||
"tmp": "~0.0.33",
|
||||
"vscode-debugadapter": "~1.24.0",
|
||||
"vscode-debugprotocol": "~1.24.0",
|
||||
"vscode-extension-telemetry": "~0.0.10",
|
||||
"vscode-extension-telemetry": "~0.0.11",
|
||||
"vscode-languageclient": "~3.4.5",
|
||||
"yauzl": "~2.8.0"
|
||||
},
|
||||
"runtimeDependencies": [
|
||||
{
|
||||
"description": "C/C++ language components (Linux / x86_64)",
|
||||
"url": "https://go.microsoft.com/fwlink/?linkid=865475",
|
||||
"url": "https://go.microsoft.com/fwlink/?linkid=866913",
|
||||
"platforms": [
|
||||
"linux"
|
||||
],
|
||||
|
@ -1094,7 +1094,7 @@
|
|||
},
|
||||
{
|
||||
"description": "C/C++ language components (Linux / x86)",
|
||||
"url": "https://go.microsoft.com/fwlink/?linkid=865476",
|
||||
"url": "https://go.microsoft.com/fwlink/?linkid=866914",
|
||||
"platforms": [
|
||||
"linux"
|
||||
],
|
||||
|
@ -1110,7 +1110,7 @@
|
|||
},
|
||||
{
|
||||
"description": "C/C++ language components (OS X)",
|
||||
"url": "https://go.microsoft.com/fwlink/?linkid=865477",
|
||||
"url": "https://go.microsoft.com/fwlink/?linkid=866915",
|
||||
"platforms": [
|
||||
"darwin"
|
||||
],
|
||||
|
@ -1121,7 +1121,7 @@
|
|||
},
|
||||
{
|
||||
"description": "C/C++ language components (Windows)",
|
||||
"url": "https://go.microsoft.com/fwlink/?linkid=865478",
|
||||
"url": "https://go.microsoft.com/fwlink/?linkid=866916",
|
||||
"platforms": [
|
||||
"win32"
|
||||
],
|
||||
|
|
|
@ -96,34 +96,34 @@ export class RemoteAttachPicker {
|
|||
// Processess will follow if listed
|
||||
let lines: string[] = output.split(/\r?\n/);
|
||||
|
||||
if (lines.length == 0) {
|
||||
if (lines.length === 0) {
|
||||
return Promise.reject<AttachItem[]>(new Error("Pipe transport failed to get OS and processes."));
|
||||
} else {
|
||||
let remoteOS: string = lines[0].replace(/[\r\n]+/g, '');
|
||||
|
||||
if (remoteOS != "Linux" && remoteOS != "Darwin") {
|
||||
if (remoteOS !== "Linux" && remoteOS !== "Darwin") {
|
||||
return Promise.reject<AttachItem[]>(new Error(`Operating system "${remoteOS}" not supported.`));
|
||||
}
|
||||
|
||||
// Only got OS from uname
|
||||
if (lines.length == 1) {
|
||||
if (lines.length === 1) {
|
||||
return Promise.reject<AttachItem[]>(new Error("Transport attach could not obtain processes list."));
|
||||
} else {
|
||||
let processes: string[] = lines.slice(1);
|
||||
return PsProcessParser.ParseProcessFromPsArray(processes)
|
||||
.sort((a, b) => {
|
||||
if (a.name == undefined) {
|
||||
if (b.name == undefined) {
|
||||
if (a.name === undefined) {
|
||||
if (b.name === undefined) {
|
||||
return 0;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
if (b.name == undefined) {
|
||||
if (b.name === undefined) {
|
||||
return -1;
|
||||
}
|
||||
let aLower: string = a.name.toLowerCase();
|
||||
let bLower: string = b.name.toLowerCase();
|
||||
if (aLower == bLower) {
|
||||
if (aLower === bLower) {
|
||||
return 0;
|
||||
}
|
||||
return aLower < bLower ? -1 : 1;
|
||||
|
|
|
@ -81,7 +81,7 @@ abstract class DefaultConfigurationProvider implements IConfigurationAssetProvid
|
|||
configurationSnippet.push(configuration.GetLaunchConfiguration());
|
||||
});
|
||||
|
||||
let initialConfigurations: any = configurationSnippet.filter(snippet => snippet.debuggerType == debuggerType && snippet.isInitialConfiguration)
|
||||
let initialConfigurations: any = configurationSnippet.filter(snippet => snippet.debuggerType === debuggerType && snippet.isInitialConfiguration)
|
||||
.map(snippet => JSON.parse(snippet.bodyText));
|
||||
|
||||
// If configurations is empty, then it will only have an empty configurations array in launch.json. Users can still add snippets.
|
||||
|
|
|
@ -63,7 +63,7 @@ function findCppToolsExtensionDebugAdapterFolder(): string {
|
|||
}
|
||||
}
|
||||
|
||||
if (dirPath == os.homedir()) {
|
||||
if (dirPath === os.homedir()) {
|
||||
console.error("Could not find installed C/C++ extension.");
|
||||
return null;
|
||||
}
|
||||
|
@ -81,7 +81,7 @@ function enableDevWorkflow(): Boolean {
|
|||
return false;
|
||||
}
|
||||
|
||||
return (EnableDevWorkflow || (process.env.CPPTOOLS_DEV != null));
|
||||
return (EnableDevWorkflow || (process.env.CPPTOOLS_DEV !== null));
|
||||
}
|
||||
|
||||
function copySourceDependencies(): void {
|
||||
|
|
|
@ -74,7 +74,7 @@ function registerAdapterExecutableCommands(): void {
|
|||
}));
|
||||
|
||||
disposables.push(vscode.commands.registerCommand('extension.cppvsdbgAdapterExecutableCommand', () => {
|
||||
if (os.platform() != 'win32') {
|
||||
if (os.platform() !== 'win32') {
|
||||
vscode.window.showErrorMessage("Debugger type 'cppvsdbg' is not avaliable for non-Windows machines.");
|
||||
return null;
|
||||
} else {
|
||||
|
|
|
@ -38,18 +38,18 @@ abstract class NativeAttachItemsProvider implements AttachItemsProvider {
|
|||
// localeCompare is significantly slower than < and > (2000 ms vs 80 ms for 10,000 elements)
|
||||
// We can change to localeCompare if this becomes an issue
|
||||
processEntries.sort((a, b) => {
|
||||
if (a.name == undefined) {
|
||||
if (b.name == undefined) {
|
||||
if (a.name === undefined) {
|
||||
if (b.name === undefined) {
|
||||
return 0;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
if (b.name == undefined) {
|
||||
if (b.name === undefined) {
|
||||
return -1;
|
||||
}
|
||||
let aLower: string = a.name.toLowerCase();
|
||||
let bLower: string = b.name.toLowerCase();
|
||||
if (aLower == bLower) {
|
||||
if (aLower === bLower) {
|
||||
return 0;
|
||||
}
|
||||
return aLower < bLower ? -1 : 1;
|
||||
|
|
|
@ -69,6 +69,21 @@ interface OutputNotificationBody {
|
|||
output: string;
|
||||
}
|
||||
|
||||
interface InactiveRegionParams {
|
||||
uri: string;
|
||||
regions: InputRegion[];
|
||||
}
|
||||
|
||||
interface InputRegion {
|
||||
startLine: number;
|
||||
endLine: number;
|
||||
}
|
||||
|
||||
interface DecorationRangesPair {
|
||||
decoration: vscode.TextEditorDecorationType;
|
||||
ranges: vscode.Range[];
|
||||
}
|
||||
|
||||
// Requests
|
||||
const NavigationListRequest: RequestType<TextDocumentIdentifier, string, void, void> = new RequestType<TextDocumentIdentifier, string, void, void>('cpptools/requestNavigationList');
|
||||
const GoToDeclarationRequest: RequestType<void, void, void, void> = new RequestType<void, void, void, void>('cpptools/goToDeclaration');
|
||||
|
@ -97,6 +112,7 @@ const ReportTagParseStatusNotification: NotificationType<ReportStatusNotificatio
|
|||
const ReportStatusNotification: NotificationType<ReportStatusNotificationBody, void> = new NotificationType<ReportStatusNotificationBody, void>('cpptools/reportStatus');
|
||||
const DebugProtocolNotification: NotificationType<OutputNotificationBody, void> = new NotificationType<OutputNotificationBody, void>('cpptools/debugProtocol');
|
||||
const DebugLogNotification: NotificationType<OutputNotificationBody, void> = new NotificationType<OutputNotificationBody, void>('cpptools/debugLog');
|
||||
const InactiveRegionNotification: NotificationType<InactiveRegionParams, void> = new NotificationType<InactiveRegionParams, void>('cpptools/inactiveRegions');
|
||||
|
||||
const maxSettingLengthForTelemetry: number = 50;
|
||||
let previousCppSettings: { [key: string]: any } = {};
|
||||
|
@ -104,7 +120,7 @@ let previousCppSettings: { [key: string]: any } = {};
|
|||
/**
|
||||
* track settings changes for telemetry
|
||||
*/
|
||||
function collectSettings(filter: (key: string, val: string, settings: vscode.WorkspaceConfiguration) => boolean, resource: vscode.Uri): { [key: string]: string } {
|
||||
function collectSettingsForTelemetry(filter: (key: string, val: string, settings: vscode.WorkspaceConfiguration) => boolean, resource: vscode.Uri): { [key: string]: string } {
|
||||
let settings: vscode.WorkspaceConfiguration = vscode.workspace.getConfiguration("C_Cpp", resource);
|
||||
let result: { [key: string]: string } = {};
|
||||
|
||||
|
@ -116,9 +132,54 @@ function collectSettings(filter: (key: string, val: string, settings: vscode.Wor
|
|||
if (val instanceof Object) {
|
||||
continue; // ignore settings that are objects since tostring on those is not useful (e.g. navigation.length)
|
||||
}
|
||||
|
||||
// Skip values that don't match the setting's enum.
|
||||
let curSetting: any = util.packageJson.contributes.configuration.properties["C_Cpp." + key];
|
||||
if (curSetting) {
|
||||
let curEnum: any[] = curSetting["enum"];
|
||||
if (curEnum && curEnum.indexOf(val) === -1) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
if (filter(key, val, settings)) {
|
||||
previousCppSettings[key] = val;
|
||||
result[key] = (key == "clang_format_path") ? "..." : String(previousCppSettings[key]);
|
||||
switch (String(key).toLowerCase()) {
|
||||
case "clang_format_path": {
|
||||
continue;
|
||||
}
|
||||
case "clang_format_style":
|
||||
case "clang_format_fallbackstyle": {
|
||||
let newKey: string = String(key) + "2";
|
||||
if (val) {
|
||||
switch (String(val).toLowerCase()) {
|
||||
case "visual studio":
|
||||
case "llvm":
|
||||
case "google":
|
||||
case "chromium":
|
||||
case "mozilla":
|
||||
case "webkit":
|
||||
case "file":
|
||||
case "none": {
|
||||
result[newKey] = String(previousCppSettings[key]);
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
result[newKey] = "...";
|
||||
break;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
result[newKey] = "null";
|
||||
}
|
||||
key = newKey;
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
result[key] = String(previousCppSettings[key]);
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (result[key].length > maxSettingLengthForTelemetry) {
|
||||
result[key] = result[key].substr(0, maxSettingLengthForTelemetry) + "...";
|
||||
}
|
||||
|
@ -129,7 +190,7 @@ function collectSettings(filter: (key: string, val: string, settings: vscode.Wor
|
|||
}
|
||||
|
||||
function initializeSettingsCache(resource: vscode.Uri): void {
|
||||
collectSettings(() => true, resource);
|
||||
collectSettingsForTelemetry(() => true, resource);
|
||||
}
|
||||
|
||||
function getNonDefaultSettings(resource: vscode.Uri): { [key: string]: string } {
|
||||
|
@ -137,7 +198,7 @@ function getNonDefaultSettings(resource: vscode.Uri): { [key: string]: string }
|
|||
return val !== settings.inspect(key).defaultValue;
|
||||
};
|
||||
initializeSettingsCache(resource);
|
||||
return collectSettings(filter, resource);
|
||||
return collectSettingsForTelemetry(filter, resource);
|
||||
}
|
||||
|
||||
interface ClientModel {
|
||||
|
@ -159,6 +220,7 @@ export interface Client {
|
|||
Name: string;
|
||||
TrackedDocuments: Set<vscode.TextDocument>;
|
||||
onDidChangeSettings(): void;
|
||||
onDidChangeVisibleTextEditors(editors: vscode.TextEditor[]): void;
|
||||
takeOwnership(document: vscode.TextDocument): void;
|
||||
requestGoToDeclaration(): Thenable<void>;
|
||||
requestSwitchHeaderSource(rootPath: string, fileName: string): Thenable<string>;
|
||||
|
@ -198,6 +260,7 @@ class DefaultClient implements Client {
|
|||
private crashTimes: number[] = [];
|
||||
private failureMessageShown = new PersistentState<boolean>("DefaultClient.failureMessageShown", false);
|
||||
private isSupported: boolean = true;
|
||||
private inactiveRegionsDecorations = new Map<string, DecorationRangesPair>();
|
||||
|
||||
// The "model" that is displayed via the UI (status bar).
|
||||
private model: ClientModel = {
|
||||
|
@ -375,13 +438,23 @@ class DefaultClient implements Client {
|
|||
let filter: (key: string, val: string) => boolean = (key: string, val: string) => {
|
||||
return !(key in previousCppSettings) || val !== previousCppSettings[key];
|
||||
};
|
||||
let changedSettings: any = collectSettings(filter, this.RootUri);
|
||||
let changedSettings: any = collectSettingsForTelemetry(filter, this.RootUri);
|
||||
|
||||
if (Object.keys(changedSettings).length > 0) {
|
||||
telemetry.logLanguageServerEvent("CppSettingsChange", changedSettings, null);
|
||||
}
|
||||
}
|
||||
|
||||
public onDidChangeVisibleTextEditors(editors: vscode.TextEditor[]): void {
|
||||
//Apply text decorations to inactive regions
|
||||
for (let e of editors) {
|
||||
let valuePair: DecorationRangesPair = this.inactiveRegionsDecorations.get(e.document.uri.toString());
|
||||
if (valuePair) {
|
||||
e.setDecorations(valuePair.decoration, valuePair.ranges); // VSCode clears the decorations when the text editor becomes invisible
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Take ownership of a document that was previously serviced by another client.
|
||||
* This process involves sending a textDocument/didOpen message to the server so
|
||||
|
@ -434,6 +507,7 @@ class DefaultClient implements Client {
|
|||
this.languageClient.onNotification(ReportNavigationNotification, (e) => this.navigate(e));
|
||||
this.languageClient.onNotification(ReportStatusNotification, (e) => this.updateStatus(e));
|
||||
this.languageClient.onNotification(ReportTagParseStatusNotification, (e) => this.updateTagParseStatus(e));
|
||||
this.languageClient.onNotification(InactiveRegionNotification, (e) => this.updateInactiveRegions(e));
|
||||
this.setupOutputHandlers();
|
||||
}
|
||||
|
||||
|
@ -553,7 +627,7 @@ class DefaultClient implements Client {
|
|||
continue; // File already has an association.
|
||||
}
|
||||
let j: number = file.lastIndexOf('.');
|
||||
if (j != -1) {
|
||||
if (j !== -1) {
|
||||
let ext: string = file.substr(j);
|
||||
if ((("*" + ext) in assocs) || (("**/*" + ext) in assocs)) {
|
||||
continue; // Extension already has an association.
|
||||
|
@ -620,6 +694,44 @@ class DefaultClient implements Client {
|
|||
this.model.tagParserStatus.Value = notificationBody.status;
|
||||
}
|
||||
|
||||
private updateInactiveRegions(params: InactiveRegionParams): void {
|
||||
let renderOptions: vscode.DecorationRenderOptions = {
|
||||
light: { color: "rgba(175,175,175,1.0)" },
|
||||
dark: { color: "rgba(155,155,155,1.0)" }
|
||||
};
|
||||
let decoration: vscode.TextEditorDecorationType = vscode.window.createTextEditorDecorationType(renderOptions);
|
||||
|
||||
// We must convert to vscode.Ranges in order to make use of the API's
|
||||
let ranges: vscode.Range[] = [];
|
||||
params.regions.forEach(element => {
|
||||
let newRange : vscode.Range = new vscode.Range(element.startLine, 0, element.endLine, 0);
|
||||
ranges.push(newRange);
|
||||
});
|
||||
|
||||
// Find entry for cached file and act accordingly
|
||||
let valuePair: DecorationRangesPair = this.inactiveRegionsDecorations.get(params.uri);
|
||||
if (valuePair) {
|
||||
// Disposing of and resetting the decoration will undo previously applied text decorations
|
||||
valuePair.decoration.dispose();
|
||||
valuePair.decoration = decoration;
|
||||
|
||||
// As vscode.TextEditor.setDecorations only applies to visible editors, we must cache the range for when another editor becomes visible
|
||||
valuePair.ranges = ranges;
|
||||
} else { // The entry does not exist. Make a new one
|
||||
let toInsert: DecorationRangesPair = {
|
||||
decoration: decoration,
|
||||
ranges: ranges
|
||||
};
|
||||
this.inactiveRegionsDecorations.set(params.uri, toInsert);
|
||||
}
|
||||
|
||||
// Apply the decorations to all *visible* text editors
|
||||
let editors: vscode.TextEditor[] = vscode.window.visibleTextEditors.filter(e => e.document.uri.toString() === params.uri);
|
||||
for (let e of editors) {
|
||||
e.setDecorations(decoration, ranges);
|
||||
}
|
||||
}
|
||||
|
||||
/*********************************************
|
||||
* requests to the language server
|
||||
*********************************************/
|
||||
|
@ -739,9 +851,9 @@ class DefaultClient implements Client {
|
|||
this.notifyWhenReady(() => {
|
||||
ui.showParsingCommands()
|
||||
.then((index: number) => {
|
||||
if (index == 0) {
|
||||
if (index === 0) {
|
||||
this.pauseParsing();
|
||||
} else if (index == 1) {
|
||||
} else if (index === 1) {
|
||||
this.resumeParsing();
|
||||
}
|
||||
});
|
||||
|
@ -783,11 +895,11 @@ class DefaultClient implements Client {
|
|||
function getLanguageServerFileName(): string {
|
||||
let extensionProcessName: string = 'Microsoft.VSCode.CPP.Extension';
|
||||
let plat: NodeJS.Platform = process.platform;
|
||||
if (plat == 'linux') {
|
||||
if (plat === 'linux') {
|
||||
extensionProcessName += '.linux';
|
||||
} else if (plat == 'darwin') {
|
||||
} else if (plat === 'darwin') {
|
||||
extensionProcessName += '.darwin';
|
||||
} else if (plat == 'win32') {
|
||||
} else if (plat === 'win32') {
|
||||
extensionProcessName += '.exe';
|
||||
} else {
|
||||
throw "Invalid Platform";
|
||||
|
@ -809,6 +921,7 @@ class NullClient implements Client {
|
|||
Name: string = "(empty)";
|
||||
TrackedDocuments = new Set<vscode.TextDocument>();
|
||||
onDidChangeSettings(): void {}
|
||||
onDidChangeVisibleTextEditors(editors: vscode.TextEditor[]): void {}
|
||||
takeOwnership(document: vscode.TextDocument): void {}
|
||||
requestGoToDeclaration(): Thenable<void> { return Promise.resolve(); }
|
||||
requestSwitchHeaderSource(rootPath: string, fileName: string): Thenable<string> { return Promise.resolve(""); }
|
||||
|
|
|
@ -63,7 +63,8 @@ let defaultSettings: string = `{
|
|||
],
|
||||
"defines": [
|
||||
"_DEBUG",
|
||||
"UNICODE"
|
||||
"UNICODE",
|
||||
"_UNICODE"
|
||||
],
|
||||
"intelliSenseMode": "msvc-x64",
|
||||
"browse": {
|
||||
|
@ -203,7 +204,7 @@ export class CppProperties {
|
|||
if (this.configurationIncomplete && this.defaultIncludes !== undefined && this.defaultFrameworks !== undefined) {
|
||||
this.configurationJson.configurations[this.CurrentConfiguration].includePath = this.defaultIncludes;
|
||||
this.configurationJson.configurations[this.CurrentConfiguration].browse.path = this.defaultIncludes;
|
||||
if (process.platform == 'darwin') {
|
||||
if (process.platform === 'darwin') {
|
||||
this.configurationJson.configurations[this.CurrentConfiguration].macFrameworkPath = this.defaultFrameworks;
|
||||
}
|
||||
this.configurationIncomplete = false;
|
||||
|
@ -216,15 +217,15 @@ export class CppProperties {
|
|||
}
|
||||
let nodePlatform: NodeJS.Platform = process.platform;
|
||||
let plat: string;
|
||||
if (nodePlatform == 'linux') {
|
||||
if (nodePlatform === 'linux') {
|
||||
plat = "Linux";
|
||||
} else if (nodePlatform == 'darwin') {
|
||||
} else if (nodePlatform === 'darwin') {
|
||||
plat = "Mac";
|
||||
} else if (nodePlatform == 'win32') {
|
||||
} else if (nodePlatform === 'win32') {
|
||||
plat = "Win32";
|
||||
}
|
||||
for (let i: number = 0; i < this.configurationJson.configurations.length; i++) {
|
||||
if (config.configurations[i].name == plat) {
|
||||
if (config.configurations[i].name === plat) {
|
||||
return i;
|
||||
}
|
||||
}
|
||||
|
@ -233,14 +234,14 @@ export class CppProperties {
|
|||
|
||||
private getIntelliSenseModeForPlatform(name: string): string {
|
||||
// Do the built-in configs first.
|
||||
if (name == "Linux" || name == "Mac") {
|
||||
if (name === "Linux" || name === "Mac") {
|
||||
return "clang-x64";
|
||||
} else if (name == "Win32") {
|
||||
} else if (name === "Win32") {
|
||||
return "msvc-x64";
|
||||
} else {
|
||||
// Custom configs default to the OS's preference.
|
||||
let nodePlatform: NodeJS.Platform = process.platform;
|
||||
if (nodePlatform == 'linux' || nodePlatform == 'darwin') {
|
||||
if (nodePlatform === 'linux' || nodePlatform === 'darwin') {
|
||||
return "clang-x64";
|
||||
}
|
||||
}
|
||||
|
@ -266,7 +267,7 @@ export class CppProperties {
|
|||
}
|
||||
|
||||
public select(index: number): Configuration {
|
||||
if (index == this.configurationJson.configurations.length) {
|
||||
if (index === this.configurationJson.configurations.length) {
|
||||
this.handleConfigurationEditCommand(vscode.window.showTextDocument);
|
||||
return;
|
||||
}
|
||||
|
@ -319,7 +320,7 @@ export class CppProperties {
|
|||
});
|
||||
filePaths.forEach((path: string) => {
|
||||
this.compileCommandFileWatchers.push(fs.watch(path, (event: string, filename: string) => {
|
||||
if (event != "rename") {
|
||||
if (event !== "rename") {
|
||||
this.onCompileCommandsChanged(path);
|
||||
}
|
||||
}));
|
||||
|
@ -389,7 +390,7 @@ export class CppProperties {
|
|||
private parsePropertiesFile(): void {
|
||||
try {
|
||||
let readResults: string = fs.readFileSync(this.propertiesFile.fsPath, 'utf8');
|
||||
if (readResults == "") {
|
||||
if (readResults === "") {
|
||||
return; // Repros randomly when the file is initially created. The parse will get called again after the file is written.
|
||||
}
|
||||
|
||||
|
@ -418,7 +419,7 @@ export class CppProperties {
|
|||
}
|
||||
}
|
||||
|
||||
if (this.configurationJson.version != configVersion) {
|
||||
if (this.configurationJson.version !== configVersion) {
|
||||
dirty = true;
|
||||
if (this.configurationJson.version === undefined) {
|
||||
this.updateToVersion2();
|
||||
|
@ -477,13 +478,13 @@ export class CppProperties {
|
|||
let propertiesFile: string = path.join(this.configFolder, "c_cpp_properties.json");
|
||||
fs.stat(propertiesFile, (err, stats) => {
|
||||
if (err) {
|
||||
if (this.propertiesFile != null) {
|
||||
if (this.propertiesFile !== null) {
|
||||
this.propertiesFile = null; // File deleted.
|
||||
this.resetToDefaultSettings(true);
|
||||
this.handleConfigurationChange();
|
||||
}
|
||||
} else if (stats.mtime > this.configFileWatcherFallbackTime) {
|
||||
if (this.propertiesFile == null) {
|
||||
if (this.propertiesFile === null) {
|
||||
this.propertiesFile = vscode.Uri.file(propertiesFile); // File created.
|
||||
}
|
||||
this.handleConfigurationChange();
|
||||
|
|
|
@ -81,7 +81,7 @@ export function activate(activationEventOccurred: boolean): void {
|
|||
if (vscode.workspace.textDocuments !== undefined && vscode.workspace.textDocuments.length > 0) {
|
||||
for (let i: number = 0; i < vscode.workspace.textDocuments.length; ++i) {
|
||||
let document: vscode.TextDocument = vscode.workspace.textDocuments[i];
|
||||
if (document.languageId == "cpp" || document.languageId == "c") {
|
||||
if (document.languageId === "cpp" || document.languageId === "c") {
|
||||
return onActivationEvent();
|
||||
}
|
||||
}
|
||||
|
@ -95,7 +95,7 @@ function onDidOpenTextDocument(document: vscode.TextDocument): void {
|
|||
}
|
||||
|
||||
function onActivationEvent(): void {
|
||||
if (tempCommands.length == 0) {
|
||||
if (tempCommands.length === 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -126,6 +126,7 @@ function realActivation(): void {
|
|||
disposables.push(vscode.workspace.onDidSaveTextDocument(onDidSaveTextDocument));
|
||||
disposables.push(vscode.window.onDidChangeActiveTextEditor(onDidChangeActiveTextEditor));
|
||||
disposables.push(vscode.window.onDidChangeTextEditorSelection(onDidChangeTextEditorSelection));
|
||||
disposables.push(vscode.window.onDidChangeVisibleTextEditors(onDidChangeVisibleTextEditors));
|
||||
|
||||
disposables.push(vscode.languages.setLanguageConfiguration('c', multilineCommentRules));
|
||||
disposables.push(vscode.languages.setLanguageConfiguration('cpp', multilineCommentRules));
|
||||
|
@ -163,7 +164,7 @@ function onDidChangeActiveTextEditor(editor: vscode.TextEditor): void {
|
|||
}
|
||||
|
||||
let activeEditor: vscode.TextEditor = vscode.window.activeTextEditor;
|
||||
if (!activeEditor || (activeEditor.document.languageId != "cpp" && activeEditor.document.languageId != "c")) {
|
||||
if (!activeEditor || (activeEditor.document.languageId !== "cpp" && activeEditor.document.languageId !== "c")) {
|
||||
activeDocument = "";
|
||||
} else {
|
||||
activeDocument = editor.document.uri.toString();
|
||||
|
@ -180,7 +181,7 @@ function onDidChangeTextEditorSelection(event: vscode.TextEditorSelectionChangeE
|
|||
return;
|
||||
}
|
||||
|
||||
if (activeDocument != event.textEditor.document.uri.toString()) {
|
||||
if (activeDocument !== event.textEditor.document.uri.toString()) {
|
||||
// For some strange (buggy?) reason we don't reliably get onDidChangeActiveTextEditor callbacks.
|
||||
activeDocument = event.textEditor.document.uri.toString();
|
||||
clients.activeDocumentChanged(event.textEditor.document);
|
||||
|
@ -189,6 +190,10 @@ function onDidChangeTextEditorSelection(event: vscode.TextEditorSelectionChangeE
|
|||
clients.ActiveClient.selectionChanged(event.selections[0].start);
|
||||
}
|
||||
|
||||
function onDidChangeVisibleTextEditors(editors: vscode.TextEditor[]): void {
|
||||
clients.forEach(client => client.onDidChangeVisibleTextEditors(editors));
|
||||
}
|
||||
|
||||
function onInterval(): void {
|
||||
// TODO: do we need to pump messages to all clients? depends on what we do with the icons, I suppose.
|
||||
clients.ActiveClient.onInterval();
|
||||
|
@ -245,7 +250,7 @@ function onSwitchHeaderSource(): void {
|
|||
return;
|
||||
}
|
||||
|
||||
if (activeEditor.document.languageId != "cpp" && activeEditor.document.languageId != "c") {
|
||||
if (activeEditor.document.languageId !== "cpp" && activeEditor.document.languageId !== "c") {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -379,7 +384,7 @@ function onTakeSurvey(): void {
|
|||
}
|
||||
|
||||
function reportMacCrashes(): void {
|
||||
if (process.platform == "darwin") {
|
||||
if (process.platform === "darwin") {
|
||||
prevCrashFile = "";
|
||||
let crashFolder: string = path.resolve(process.env.HOME, "Library/Logs/DiagnosticReports");
|
||||
fs.stat(crashFolder, (err, stats) => {
|
||||
|
|
|
@ -165,7 +165,7 @@ export class UI {
|
|||
});
|
||||
}
|
||||
|
||||
public showWorkspaces(workspaceNames: { name: string, key: string }[]): Thenable<string> {
|
||||
public showWorkspaces(workspaceNames: { name: string; key: string }[]): Thenable<string> {
|
||||
let options: vscode.QuickPickOptions = {};
|
||||
options.placeHolder = "Select a Workspace...";
|
||||
|
||||
|
@ -187,7 +187,7 @@ export class UI {
|
|||
|
||||
let items: IndexableQuickPickItem[];
|
||||
items = [];
|
||||
if (this.browseEngineStatusBarItem.tooltip == "Parsing paused") {
|
||||
if (this.browseEngineStatusBarItem.tooltip === "Parsing paused") {
|
||||
items.push({ label: "Resume Parsing", description: "", index: 1 });
|
||||
} else {
|
||||
items.push({ label: "Pause Parsing", description: "", index: 0 });
|
||||
|
|
|
@ -17,7 +17,7 @@ const userBucketMax: number = 100;
|
|||
const userBucketString: string = "CPP.UserBucket";
|
||||
|
||||
export function activate(context: vscode.ExtensionContext): void {
|
||||
if (context.globalState.get<number>(userBucketString, -1) == -1) {
|
||||
if (context.globalState.get<number>(userBucketString, -1) === -1) {
|
||||
let bucket: number = Math.floor(Math.random() * userBucketMax) + 1; // Range is [1, userBucketMax].
|
||||
context.globalState.update(userBucketString, bucket);
|
||||
}
|
||||
|
@ -38,7 +38,7 @@ function downloadCpptoolsJson(urlString): Promise<void> {
|
|||
agent: util.GetHttpsProxyAgent(),
|
||||
rejectUnauthorized: vscode.workspace.getConfiguration().get("http.proxyStrictSSL", true)
|
||||
}, (response) => {
|
||||
if (response.statusCode == 301 || response.statusCode == 302) {
|
||||
if (response.statusCode === 301 || response.statusCode === 302) {
|
||||
let redirectUrl: string | string[];
|
||||
if (typeof response.headers.location === "string") {
|
||||
redirectUrl = response.headers.location;
|
||||
|
@ -47,7 +47,7 @@ function downloadCpptoolsJson(urlString): Promise<void> {
|
|||
}
|
||||
return resolve(downloadCpptoolsJson(redirectUrl)); // Redirect - download from new location
|
||||
}
|
||||
if (response.statusCode != 200) {
|
||||
if (response.statusCode !== 200) {
|
||||
return reject();
|
||||
}
|
||||
let downloadedBytes = 0; // tslint:disable-line
|
||||
|
@ -88,7 +88,7 @@ export function processCpptoolsJson(cpptoolsString: string): Promise<void> {
|
|||
} else {
|
||||
util.packageJson.contributes.configuration.properties["C_Cpp.intelliSenseEngine"].default = "Tag Parser";
|
||||
}
|
||||
if (prevIntelliSenseEngineDefault != util.packageJson.contributes.configuration.properties["C_Cpp.intelliSenseEngine"].default) {
|
||||
if (prevIntelliSenseEngineDefault !== util.packageJson.contributes.configuration.properties["C_Cpp.intelliSenseEngine"].default) {
|
||||
return util.writeFileText(util.getPackageJsonPath(), util.getPackageJsonString());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -13,6 +13,7 @@ import HttpsProxyAgent = require('https-proxy-agent');
|
|||
import * as url from 'url';
|
||||
import { PlatformInformation } from './platform';
|
||||
import { getOutputChannelLogger, showOutputChannel } from './logger';
|
||||
import * as assert from 'assert';
|
||||
|
||||
export let extensionContext: vscode.ExtensionContext;
|
||||
export function setExtensionContext(context: vscode.ExtensionContext): void {
|
||||
|
@ -45,7 +46,7 @@ export const extensionNotReadyString: string = 'The C/C++ extension is still ins
|
|||
export function displayExtensionNotReadyPrompt(): void {
|
||||
|
||||
if (!isExtensionNotReadyPromptDisplayed) {
|
||||
isExtensionNotReadyPromptDisplayed = true;
|
||||
isExtensionNotReadyPromptDisplayed = true;
|
||||
showOutputChannel();
|
||||
|
||||
getOutputChannelLogger().showInformationMessage(extensionNotReadyString).then(
|
||||
|
@ -123,18 +124,34 @@ export function resolveVariables(input: string): string {
|
|||
return "";
|
||||
}
|
||||
|
||||
// Replace environment variables. (support both ${env:VAR} and ${VAR} syntax)
|
||||
let regexp: RegExp = /\$\{(env:|env.)?(.*?)\}/g;
|
||||
let ret: string = input.replace(regexp, (match: string, ignored: string, name: string) => {
|
||||
let newValue: string = process.env[name];
|
||||
return (newValue != null) ? newValue : match;
|
||||
// Replace environment and configuration variables.
|
||||
let regexp: RegExp = /\$\{((env|config)(.|:))?(.*?)\}/g;
|
||||
let ret: string = input.replace(regexp, (match: string, ignored1: string, varType: string, ignored2: string, name: string) => {
|
||||
// Historically, if the variable didn't have anything before the "." or ":"
|
||||
// it was assumed to be an environment variable
|
||||
if (varType === undefined) {
|
||||
varType = "env";
|
||||
}
|
||||
let newValue: string = undefined;
|
||||
switch (varType) {
|
||||
case "env": { newValue = process.env[name]; break; }
|
||||
case "config": {
|
||||
let config: vscode.WorkspaceConfiguration = vscode.workspace.getConfiguration();
|
||||
let keys: string[] = name.split('.');
|
||||
keys.forEach((key: string) => { config = (config) ? config.get(key) : config; });
|
||||
newValue = (config) ? config.toString() : undefined;
|
||||
break;
|
||||
}
|
||||
default: { assert.fail("unknown varType matched"); }
|
||||
}
|
||||
return (newValue) ? newValue : match;
|
||||
});
|
||||
|
||||
// Resolve '~' at the start of the path.
|
||||
regexp = /^\~/g;
|
||||
ret = ret.replace(regexp, (match: string, name: string) => {
|
||||
let newValue: string = process.env.HOME;
|
||||
return (newValue != null) ? newValue : match;
|
||||
return (newValue) ? newValue : match;
|
||||
});
|
||||
|
||||
return ret;
|
||||
|
@ -152,9 +169,9 @@ export function asFolder(uri: vscode.Uri): string {
|
|||
* get the default open command for the current platform
|
||||
*/
|
||||
export function getOpenCommand(): string {
|
||||
if (os.platform() == 'win32') {
|
||||
if (os.platform() === 'win32') {
|
||||
return 'explorer';
|
||||
} else if (os.platform() == 'darwin') {
|
||||
} else if (os.platform() === 'darwin') {
|
||||
return '/usr/bin/open';
|
||||
} else {
|
||||
return '/usr/bin/xdg-open';
|
||||
|
@ -350,7 +367,7 @@ export function spawnChildProcess(process: string, args: string[], workingDirect
|
|||
|
||||
export function allowExecution(file: string): Promise<void> {
|
||||
return new Promise<void>((resolve, reject) => {
|
||||
if (process.platform != 'win32') {
|
||||
if (process.platform !== 'win32') {
|
||||
checkFileExists(file).then((exists: boolean) => {
|
||||
if (exists) {
|
||||
fs.chmod(file, '755', (err: NodeJS.ErrnoException) => {
|
||||
|
@ -376,7 +393,7 @@ export function removePotentialPII(str: string): string {
|
|||
let words: string[] = str.split(" ");
|
||||
let result: string = "";
|
||||
for (let word of words) {
|
||||
if (word.indexOf(".") == -1 && word.indexOf("/") == -1 && word.indexOf("\\") == -1 && word.indexOf(":") == -1) {
|
||||
if (word.indexOf(".") === -1 && word.indexOf("/") === -1 && word.indexOf("\\") === -1 && word.indexOf(":") === -1) {
|
||||
result += word + " ";
|
||||
} else {
|
||||
result += "? ";
|
||||
|
@ -386,7 +403,7 @@ export function removePotentialPII(str: string): string {
|
|||
}
|
||||
|
||||
export function checkDistro(platformInfo: PlatformInformation): void {
|
||||
if (platformInfo.platform != 'win32' && platformInfo.platform != 'linux' && platformInfo.platform != 'darwin') {
|
||||
if (platformInfo.platform !== 'win32' && platformInfo.platform !== 'linux' && platformInfo.platform !== 'darwin') {
|
||||
// this should never happen because VSCode doesn't run on FreeBSD
|
||||
// or SunOS (the other platforms supported by node)
|
||||
getOutputChannelLogger().appendLine(`Warning: Debugging has not been tested for this platform. ${getReadmeMessage()}`);
|
||||
|
|
|
@ -53,7 +53,7 @@ export class LinuxDistribution {
|
|||
let keyValues: string[] = data.split(os.EOL);
|
||||
for (let i: number = 0; i < keyValues.length; i++) {
|
||||
let keyValue: string[] = keyValues[i].split('=');
|
||||
if (keyValue.length == 2) {
|
||||
if (keyValue.length === 2) {
|
||||
if (keyValue[0] === idKey) {
|
||||
distroName = keyValue[1];
|
||||
} else if (keyValue[0] === versionKey) {
|
||||
|
|
|
@ -56,7 +56,7 @@ export class Logger {
|
|||
let outputChannel: vscode.OutputChannel;
|
||||
|
||||
export function getOutputChannel(): vscode.OutputChannel {
|
||||
if (outputChannel == undefined) {
|
||||
if (outputChannel === undefined) {
|
||||
outputChannel = vscode.window.createOutputChannel("C/C++");
|
||||
}
|
||||
return outputChannel;
|
||||
|
|
|
@ -47,7 +47,7 @@ async function processRuntimeDependencies(): Promise<void> {
|
|||
|
||||
if (installLockExists) {
|
||||
// Offline Scenario: Lock file exists but package.json has not had its activationEvents rewritten.
|
||||
if (util.packageJson.activationEvents && util.packageJson.activationEvents.length == 1) {
|
||||
if (util.packageJson.activationEvents && util.packageJson.activationEvents.length === 1) {
|
||||
try {
|
||||
await offlineInstallation();
|
||||
} catch (error) {
|
||||
|
@ -208,7 +208,7 @@ function handleError(error: any): void {
|
|||
}
|
||||
|
||||
let outputChannelLogger: Logger = getOutputChannelLogger();
|
||||
if (installationInformation.stage == 'downloadPackages') {
|
||||
if (installationInformation.stage === 'downloadPackages') {
|
||||
outputChannelLogger.appendLine("");
|
||||
}
|
||||
// Show the actual message and not the sanitized one
|
||||
|
|
|
@ -180,7 +180,7 @@ export class PackageManager {
|
|||
});
|
||||
}).then(() => {
|
||||
this.AppendLineChannel(" Done!");
|
||||
if (retryCount != 0) {
|
||||
if (retryCount !== 0) {
|
||||
// Log telemetry to see if retrying helps.
|
||||
let telemetryProperties: { [key: string]: string } = {};
|
||||
telemetryProperties["success"] = `OnRetry${retryCount}`;
|
||||
|
@ -216,19 +216,19 @@ export class PackageManager {
|
|||
|
||||
return new Promise<void>((resolve, reject) => {
|
||||
let secondsDelay: number = Math.pow(2, delay);
|
||||
if (secondsDelay == 1) {
|
||||
if (secondsDelay === 1) {
|
||||
secondsDelay = 0;
|
||||
}
|
||||
if (secondsDelay > 4) {
|
||||
this.AppendChannel(`Waiting ${secondsDelay} seconds...`);
|
||||
}
|
||||
setTimeout(() => {
|
||||
if (!pkg.tmpFile || pkg.tmpFile.fd == 0) {
|
||||
if (!pkg.tmpFile || pkg.tmpFile.fd === 0) {
|
||||
return reject(new PackageManagerError('Temporary Package file unavailable', 'DownloadFile', pkg));
|
||||
}
|
||||
|
||||
let handleHttpResponse: (response: IncomingMessage) => void = (response: IncomingMessage) => {
|
||||
if (response.statusCode == 301 || response.statusCode == 302) {
|
||||
if (response.statusCode === 301 || response.statusCode === 302) {
|
||||
// Redirect - download from new location
|
||||
let redirectUrl: string | string[];
|
||||
if (typeof response.headers.location === "string") {
|
||||
|
@ -237,7 +237,7 @@ export class PackageManager {
|
|||
redirectUrl = response.headers.location[0];
|
||||
}
|
||||
return resolve(this.DownloadFile(redirectUrl, pkg, 0));
|
||||
} else if (response.statusCode != 200) {
|
||||
} else if (response.statusCode !== 200) {
|
||||
// Download failed - print error message
|
||||
let errorMessage: string = `failed (error code '${response.statusCode}')`;
|
||||
return reject(new PackageManagerWebResponseError(response.socket, 'HTTP/HTTPS Response Error', 'DownloadFile', pkg, errorMessage, response.statusCode.toString()));
|
||||
|
@ -307,7 +307,7 @@ export class PackageManager {
|
|||
this.SetStatusTooltip(`Installing package '${pkg.description}'`);
|
||||
|
||||
return new Promise<void>((resolve, reject) => {
|
||||
if (!pkg.tmpFile || pkg.tmpFile.fd == 0) {
|
||||
if (!pkg.tmpFile || pkg.tmpFile.fd === 0) {
|
||||
return reject(new PackageManagerError('Downloaded file unavailable', 'InstallPackage', pkg));
|
||||
}
|
||||
|
||||
|
@ -358,7 +358,7 @@ export class PackageManager {
|
|||
});
|
||||
} else {
|
||||
// Skip the message for text files, because there is a duplicate text file unzipped.
|
||||
if (path.extname(absoluteEntryPath) != ".txt") {
|
||||
if (path.extname(absoluteEntryPath) !== ".txt") {
|
||||
this.AppendLineChannel(`Warning: File '${absoluteEntryPath}' already exists and was not updated.`);
|
||||
}
|
||||
zipfile.readEntry();
|
||||
|
|
|
@ -13,6 +13,8 @@
|
|||
"one-line": [true, "check-catch", "check-finally", "check-else", "check-open-brace", "check-whitespace"],
|
||||
"promise-must-complete": true,
|
||||
"semicolon": true,
|
||||
"triple-equals": true,
|
||||
"type-literal-delimiter": true,
|
||||
"typedef": [true, "variable-declaration", "call-signature"],
|
||||
"whitespace": [true, "check-branch", "check-operator", "check-separator", "check-preblock", "check-type"]
|
||||
},
|
||||
|
|
10
README.md
10
README.md
|
@ -1,13 +1,15 @@
|
|||
# vscode-cpptools
|
||||
|
||||
This repo is the official repository for filing issues against and getting support for the Microsoft C/C++ extension for VsCode (https://marketplace.visualstudio.com/items?itemName=ms-vscode.cpptools).
|
||||
This is the official repository for filing issues against and getting support for the [Microsoft C/C++ extension for VS Code](https://marketplace.visualstudio.com/items?itemName=ms-vscode.cpptools).
|
||||
|
||||
### Microsoft Open Source Code of Conduct
|
||||
This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.
|
||||
|
||||
This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact opencode@microsoft.com with any additional questions or comments.
|
||||
|
||||
### Documentation
|
||||
Documentation has been moved to a folder marked Documentation within the repository. If you would like to contribute, please create a markdown file and submit a pull request.
|
||||
|
||||
The documentation has been moved to the [**Documentation**](Documentation) folder. If you would like to contribute, please create a Markdown file and submit a pull request.
|
||||
|
||||
### Data/Telemetry
|
||||
|
||||
This project collects usage data and sends it to Microsoft to help improve our products and services. Read our [privacy statement](https://privacy.microsoft.com/en-us/privacystatement) to learn more.
|
||||
This project collects usage data and sends it to Microsoft to help improve our products and services. Read our [privacy statement](https://privacy.microsoft.com/en-us/privacystatement) to learn more.
|
||||
|
|
126
launch.md
126
launch.md
|
@ -1,9 +1,9 @@
|
|||
# Configuring launch.json for C/C++ debugging
|
||||
# Configuring `launch.json` for C/C++ debugging
|
||||
|
||||
The `launch.json` file is used to configure the debugger in Visual Studio Code.
|
||||
The **launch.json** file is used to configure the debugger in Visual Studio Code.
|
||||
|
||||
Visual Studio Code generates a `launch.json` with almost all of the required information. To get started
|
||||
debugging you need to fill in the `program` field with the path to the executable you plan to debug. This must be specified for
|
||||
Visual Studio Code generates a **launch.json** with almost all of the required information. To get started
|
||||
debugging you need to fill in the `program` field with the path to the executable you plan to debug. This must be specified for
|
||||
both the launch and attach (if you plan to attach to a running instance at any point) configurations.
|
||||
|
||||
The generated file contains two sections. One that configures debugging for launch and a second that configures debugging for attach.
|
||||
|
@ -12,25 +12,38 @@ The generated file contains two sections. One that configures debugging for lau
|
|||
|
||||
Set or change the following options to control VS Code's behavior during debugging
|
||||
|
||||
**program**: `Required` Specifies the full path to executable the debugger will launch or attach to.
|
||||
* #### `program` (required)
|
||||
Specifies the full path to executable the debugger will launch or attach to.
|
||||
|
||||
**symbolSearchPath**: Tells the _Visual Studio Windows Debugger_ what paths to search for symbol (.pdb) files. Separate multiple paths with a semicolon. Example `"C:\\Symbols;C:\\SymbolDir2"`
|
||||
* #### `symbolSearchPath`
|
||||
Tells the _Visual Studio Windows Debugger_ what paths to search for symbol (.pdb) files. Separate multiple paths with a semicolon. Example `"C:\\Symbols;C:\\SymbolDir2"`
|
||||
|
||||
**additionalSOLibSearchPath**: Tells _GDB or LLDB_ what paths to search for .so files. Separate multiple paths with a semicolon. Example: `"/Users/user/dir1;/Users/user/dir2"`.
|
||||
* #### `additionalSOLibSearchPath`
|
||||
Tells _GDB or LLDB_ what paths to search for .so files. Separate multiple paths with a semicolon. Example: `"/Users/user/dir1;/Users/user/dir2"`.
|
||||
|
||||
**externalConsole**: If set to `true`, launches an external console for the application. If `false`, no console is launched and VS Code's debugging console is used. Note this option is ignored in some cases for technical reasons.
|
||||
|
||||
**logging**: Optional flags to determine what types of messages should be logged to the Debug Console.
|
||||
* **exceptions**: Optional flag to determine whether exception messages should be logged to the Debug Console. Defaults to true.
|
||||
* **moduleLoad**: Optional flag to determine whether module load events should be logged to the Debug Console. Defaults to true.
|
||||
* **programOutput**: Optional flag to determine whether program output should be logged to the Debug Console. Defaults to true.
|
||||
* **engineLogging**: Optional flag to determine whether diagnostic engine logs should be logged to the Debug Console. Defaults to false.
|
||||
* **trace**: Optional flag to determine whether diagnostic adapter command tracing should be logged to the Debug Console. Defaults to false.
|
||||
* **traceResponse**: Optional flag to determine whether diagnostic adapter command and response tracing should be logged to the Debug Console. Defaults to false.
|
||||
* #### `externalConsole`
|
||||
If set to `true`, launches an external console for the application. If `false`, no console is launched and VS Code's debugging console is used. Note this option is ignored in some cases for technical reasons.
|
||||
|
||||
**visualizerFile**: .natvis file to be used when debugging. See [Natvis syntax reference](http://aka.ms/natvis#Anchor_8) for information on how to create natvis files.
|
||||
* #### `logging`
|
||||
Optional flags to determine what types of messages should be logged to the Debug Console.
|
||||
* ##### `exceptions`
|
||||
Optional flag to determine whether exception messages should be logged to the Debug Console. Defaults to true.
|
||||
* ##### `moduleLoad`
|
||||
Optional flag to determine whether module load events should be logged to the Debug Console. Defaults to true.
|
||||
* ##### `programOutput`
|
||||
Optional flag to determine whether program output should be logged to the Debug Console. Defaults to true.
|
||||
* ##### `engineLogging`
|
||||
Optional flag to determine whether diagnostic engine logs should be logged to the Debug Console. Defaults to false.
|
||||
* ##### `trace`
|
||||
Optional flag to determine whether diagnostic adapter command tracing should be logged to the Debug Console. Defaults to false.
|
||||
* ##### `traceResponse`
|
||||
Optional flag to determine whether diagnostic adapter command and response tracing should be logged to the Debug Console. Defaults to false.
|
||||
|
||||
**showDisplayString**: When a visualizerFile is specified, showDisplayString will enable the display string. Turning this option on can cause slower performance during debugging.
|
||||
* #### `visualizerFile`
|
||||
.natvis file to be used when debugging. See [Natvis syntax reference](http://aka.ms/natvis#Anchor_8) for information on how to create Natvis files.
|
||||
|
||||
* #### `showDisplayString`
|
||||
When a visualizerFile is specified, showDisplayString will enable the display string. Turning this option on can cause slower performance during debugging.
|
||||
|
||||
**Example:**
|
||||
|
||||
|
@ -54,13 +67,16 @@ Set or change the following options to control VS Code's behavior during debuggi
|
|||
|
||||
# Configure the target application
|
||||
|
||||
The following options enable you to modify the state of the target application when it is launched
|
||||
The following options enable you to modify the state of the target application when it is launched:
|
||||
|
||||
**args**: JSON array of command line arguments to pass to the program when it is launched. Example `["arg1", "arg2]`.
|
||||
* #### `args`
|
||||
JSON array of command line arguments to pass to the program when it is launched. Example `["arg1", "arg2]`.
|
||||
|
||||
**cwd**: Sets the the working directory of the application launched by the debugger.
|
||||
* #### `cwd`
|
||||
Sets the the working directory of the application launched by the debugger.
|
||||
|
||||
**environment**: Environment variables to add to the environment for the program. Example: `[ { "name": "squid", "value": "clam" } ]`.
|
||||
* #### `environment`
|
||||
Environment variables to add to the environment for the program. Example: `[ { "name": "squid", "value": "clam" } ]`.
|
||||
|
||||
**Example:**
|
||||
|
||||
|
@ -76,21 +92,27 @@ The following options enable you to modify the state of the target application w
|
|||
}
|
||||
```
|
||||
|
||||
## Customizing GDB or LLDB
|
||||
## Customizing GDB or LLDB
|
||||
|
||||
You can change the behavior of GDB or LLDB by setting the following options.
|
||||
|
||||
**MIMode**: Indicates the debugger that VS Code will connect to. Must be set to `gdb` or `lldb`. This is pre-configured on a per-operating system basis and can be changed as needed.
|
||||
* #### `MIMode`
|
||||
Indicates the debugger that VS Code will connect to. Must be set to `gdb` or `lldb`. This is pre-configured on a per-operating system basis and can be changed as needed.
|
||||
|
||||
**miDebuggerPath**: The path to the debugger (such as gdb). When only the executable is specified, it will search the operating system's PATH variable for a debugger (GDB on Linux and Windows, LLDB on OS X).
|
||||
* #### `miDebuggerPath`
|
||||
The path to the debugger (such as gdb). When only the executable is specified, it will search the operating system's PATH variable for a debugger (GDB on Linux and Windows, LLDB on OS X).
|
||||
|
||||
**stopAtEntry**: If set to true, the debugger should stop at the entrypoint of the target (ignored on attach). Default value is `false`.
|
||||
* #### `stopAtEntry`
|
||||
If set to true, the debugger should stop at the entry-point of the target (ignored on attach). Default value is `false`.
|
||||
|
||||
**setupCommands**: JSON array of commands to execute in order to setup the GDB or LLDB. Example: `"setupCommands": [ { "text": "target-run", "description": "run target", "ignoreFailures": false }]`.
|
||||
|
||||
**customLaunchSetupCommands**: If provided, this replaces the default commands used to launch a target with some other commands. For example, this can be "-target-attach" in order to attach to a target process. An empty command list replaces the launch commands with nothing, which can be useful if the debugger is being provided launch options as command line options. Example: `"customLaunchSetupCommands": [ { "text": "target-run", "description": "run target", "ignoreFailures": false }]`.
|
||||
|
||||
**launchCompleteCommand**: The command to execute after the debugger is fully setup in order to cause the target process to run. Allowed values are "exec-run", "exec-continue", "None". The default value is "exec-run".
|
||||
* #### `setupCommands`
|
||||
JSON array of commands to execute in order to setup the GDB or LLDB. Example: `"setupCommands": [ { "text": "target-run", "description": "run target", "ignoreFailures": false }]`.
|
||||
|
||||
* #### `customLaunchSetupCommands`
|
||||
If provided, this replaces the default commands used to launch a target with some other commands. For example, this can be "-target-attach" in order to attach to a target process. An empty command list replaces the launch commands with nothing, which can be useful if the debugger is being provided launch options as command line options. Example: `"customLaunchSetupCommands": [ { "text": "target-run", "description": "run target", "ignoreFailures": false }]`.
|
||||
|
||||
* #### `launchCompleteCommand`
|
||||
The command to execute after the debugger is fully setup in order to cause the target process to run. Allowed values are "exec-run", "exec-continue", "None". The default value is "exec-run".
|
||||
|
||||
**Example:**
|
||||
|
||||
|
@ -123,32 +145,44 @@ You can change the behavior of GDB or LLDB by setting the following options.
|
|||
|
||||
The C/C++ extension enables debugging dump files on Windows and core dump files Linux and OS X.
|
||||
|
||||
**dumpPath**: If you want to debug a Windows dump file, set this to the path to the dump file to start debugging in the `launch` configuration.
|
||||
* #### `dumpPath`
|
||||
If you want to debug a Windows dump file, set this to the path to the dump file to start debugging in the `launch` configuration.
|
||||
|
||||
**coreDumpPath**: Full path to a core dump file to debug for the specified program. Set this to the path to the core dump file to start debugging in the `launch` configuration.
|
||||
_Note: core dump debuging is not supported with MinGw._
|
||||
* #### `coreDumpPath`
|
||||
Full path to a core dump file to debug for the specified program. Set this to the path to the core dump file to start debugging in the `launch` configuration.
|
||||
_Note: core dump debugging is not supported with MinGw._
|
||||
|
||||
## Remote debugging or debugging with a local debugger server
|
||||
|
||||
**miDebuggerServerAddress**: Network address of the debugger server (e.g. gdbserver) to connect to for remote debugging (example: `localhost:1234`).
|
||||
* #### `miDebuggerServerAddress`
|
||||
Network address of the debugger server (e.g. gdbserver) to connect to for remote debugging (example: `localhost:1234`).
|
||||
|
||||
**debugServerPath**: Full path to debug server to launch.
|
||||
* #### `debugServerPath`
|
||||
Full path to debug server to launch.
|
||||
|
||||
**debugServerArgs**: Arguments for the the debugger server.
|
||||
|
||||
**serverStarted**: Server-started pattern to look for in the debug server output.
|
||||
* #### `debugServerArgs`
|
||||
Arguments for the the debugger server.
|
||||
|
||||
**serverLaunchTimeout**: Time in milliseconds, for the debugger to wait for the debugServer to start up. Default is 10000.
|
||||
* #### `serverStarted`
|
||||
Server-started pattern to look for in the debug server output.
|
||||
|
||||
* #### `serverLaunchTimeout`
|
||||
Time in milliseconds, for the debugger to wait for the debugServer to start up. Default is 10000.
|
||||
|
||||
## Additional properties
|
||||
|
||||
**processId**: Defaults to `${command.pickProcess}` which will display a list of available processes the debugger can attach to. It is recommended to leave this default, but the property can be explicitly set to a specific process ID for the debugger to attach to.
|
||||
* #### `processId`
|
||||
Defaults to `${command.pickProcess}` which will display a list of available processes the debugger can attach to. It is recommended to leave this default, but the property can be explicitly set to a specific process ID for the debugger to attach to.
|
||||
|
||||
**request**: Indicates whether the configuration section is intended to `launch` the program or `attach` to an already running instance.
|
||||
* #### `request`
|
||||
Indicates whether the configuration section is intended to `launch` the program or `attach` to an already running instance.
|
||||
|
||||
**targetArchitecture**: `Deprecated` This option is no longer needed as the target architecture is automatically detected.
|
||||
* #### `targetArchitecture`
|
||||
`Deprecated` This option is no longer needed as the target architecture is automatically detected.
|
||||
|
||||
**type**: Indicates the underlying debugger being used. Must be `cppvsdbg` when using the Visual Studio Windows debugger, and `cppdbg` when using GDB or LLDB. This is automatically set to the correct value when the
|
||||
launch.json file is created.
|
||||
* #### `type`
|
||||
Indicates the underlying debugger being used. Must be `cppvsdbg` when using the Visual Studio Windows debugger, and `cppdbg` when using GDB or LLDB. This is automatically set to the correct value when the
|
||||
**launch.json** file is created.
|
||||
|
||||
**sourceFileMap**: This allows mapping of the compile time paths for source to local source locations. It is an object of key/value pairs and will resolve the first string-matched path. (example: `"sourceFileMap": { "/mnt/c": "c:\\" }` will map any path returned by the debugger that begins with `/mnt/c` and convert it to `c:\\`. You can have multiple mappings in the object but they will be handled in the order provided.)
|
||||
* #### `sourceFileMap`
|
||||
This allows mapping of the compile time paths for source to local source locations. It is an object of key/value pairs and will resolve the first string-matched path. (example: `"sourceFileMap": { "/mnt/c": "c:\\" }` will map any path returned by the debugger that begins with `/mnt/c` and convert it to `c:\\`. You can have multiple mappings in the object but they will be handled in the order provided.)
|
||||
|
|
Загрузка…
Ссылка в новой задаче