diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2020-04-30 18:03:26 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2020-04-30 18:03:26 +0100 |
commit | 972afffded3957c3891116a9a81ac9b049e28ad4 (patch) | |
tree | c6809cff47196d8ba9a1317f56856201b856dd23 /editors/code/src/config.ts | |
parent | fec1e7c8e10e1c592642fac0c497cd57bd3f003c (diff) | |
parent | 06b7175650c0c2570a66126b64696ed177e0d1fa (diff) |
Merge #4222
4222: Introduce C/C++ for Visual Studio Code extension as an alternative debug engine for Debug Code lens. r=matklad a=vsrs
At the moment Debug Code Lens can use only one debug engine: lldb via [CodeLLDB](https://marketplace.visualstudio.com/items?itemName=vadimcn.vscode-lldb) extension.
This PR adds support of the debug engine from the [MS C++ tools](https://marketplace.visualstudio.com/items?itemName=ms-vscode.cpptools) extension, as well as the configuration option. If both extensions are installed, `CodeLLDB` will be used by default.
Another new option `rust-analyzer.debug.sourceFileMap` allows, for example, to step into Rust std library during debugging. Works only with `MS C++ tools`.
On Windows:
```json
"rust-analyzer.debug.sourceFileMap": {
"/rustc/4fb7144ed159f94491249e86d5bbd033b5d60550": "${env:USERPROFILE}/.rustup/toolchains/stable-x86_64-pc-windows-msvc/lib/rustlib/src/rust"
}
```
On Linux:
```json
"rust-analyzer.debug.sourceFileMap": {
"/rustc/4fb7144ed159f94491249e86d5bbd033b5d60550": "~/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust"
}
```
Co-authored-by: vsrs <[email protected]>
Diffstat (limited to 'editors/code/src/config.ts')
-rw-r--r-- | editors/code/src/config.ts | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/editors/code/src/config.ts b/editors/code/src/config.ts index 3b2eec8ba..110e54180 100644 --- a/editors/code/src/config.ts +++ b/editors/code/src/config.ts | |||
@@ -92,7 +92,6 @@ export class Config { | |||
92 | get askBeforeDownload() { return this.get<boolean>("updates.askBeforeDownload"); } | 92 | get askBeforeDownload() { return this.get<boolean>("updates.askBeforeDownload"); } |
93 | get traceExtension() { return this.get<boolean>("trace.extension"); } | 93 | get traceExtension() { return this.get<boolean>("trace.extension"); } |
94 | 94 | ||
95 | |||
96 | get inlayHints() { | 95 | get inlayHints() { |
97 | return { | 96 | return { |
98 | typeHints: this.get<boolean>("inlayHints.typeHints"), | 97 | typeHints: this.get<boolean>("inlayHints.typeHints"), |
@@ -107,4 +106,12 @@ export class Config { | |||
107 | command: this.get<string>("checkOnSave.command"), | 106 | command: this.get<string>("checkOnSave.command"), |
108 | }; | 107 | }; |
109 | } | 108 | } |
109 | |||
110 | get debug() { | ||
111 | return { | ||
112 | engine: this.get<string>("debug.engine"), | ||
113 | sourceFileMap: this.get<Record<string, string>>("debug.sourceFileMap"), | ||
114 | }; | ||
115 | } | ||
116 | |||
110 | } | 117 | } |