Skip to content

Commit f9ecc9c

Browse files
authored
Merge pull request #6820 from microsoft/seanmcm/1_2_0_insiders2
1.2.0-insiders2
2 parents 37cca41 + 9405f41 commit f9ecc9c

File tree

10 files changed

+84
-11
lines changed

10 files changed

+84
-11
lines changed

Extension/CHANGELOG.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,19 @@
11
# C/C++ for Visual Studio Code Change Log
22

3+
4+
## Version 1.2.0-insiders2: January 20, 2021
5+
### Enhancement
6+
* Add new "console" launch config for cppvsdbg. [PR #6794](https://github.com/microsoft/vscode-cpptools/pull/6794)
7+
8+
### Bug Fixes
9+
* Fix autocomplete not working with `for` loop variables with C code. [#2946](https://github.com/microsoft/vscode-cpptools/issues/2946)
10+
* Fix an entry not found error for files in `compile_commands.json` that didn't initially exist. [#6311](https://github.com/microsoft/vscode-cpptools/issues/6311)
11+
* Fix IntelliSense errors with C++20 std::ranges in gcc/clang modes. [#6342](https://github.com/microsoft/vscode-cpptools/issues/6342)
12+
* Fix `compile_commands.json` not working correctly for `*.C` files. [#6497](https://github.com/microsoft/vscode-cpptools/issues/6497)
13+
* Fix IntelliSense errors when "module" is used as a variable name with C++20. [#6719](https://github.com/microsoft/vscode-cpptools/issues/6719)
14+
* Fix a runtime failure on macOS 10.13 or older. [#6787](https://github.com/microsoft/vscode-cpptools/issues/6787)
15+
* Fix `Go to Symbol in Workspace`. [#6793](https://github.com/microsoft/vscode-cpptools/issues/6793)
16+
317
## Version 1.2.0-insiders: January 14, 2021
418
### New Features
519
* Add support for cross-compilation configurations for IntelliSense. For example, `intelliSenseMode` value "linux-gcc-x64" could be used on a Mac host machine. [#1083](https://github.com/microsoft/vscode-cpptools/issues/1083)
@@ -21,6 +35,7 @@
2135
* Fix IntelliSense not switching the language mode after changing C versus C++ `files.associations`. [#2557](https://github.com/microsoft/vscode-cpptools/issues/2557)
2236
* Fix Switch Header/Source not switching to an existing file in another column if it's not visible. [#2667](https://github.com/microsoft/vscode-cpptools/issues/2667), [#6749](https://github.com/microsoft/vscode-cpptools/issues/6749)
2337
* Fix `#include` completion not sorting _ last. [#3465](https://github.com/microsoft/vscode-cpptools/issues/3465)
38+
* Fix completion not working for templates in gcc/clang mode. [#3501](https://github.com/microsoft/vscode-cpptools/issues/3501)
2439
* Fix crash when certain JavaScript files are parsed as C++. [#3858](https://github.com/microsoft/vscode-cpptools/issues/3858)
2540
* Fix IntelliSense squiggle about not being able to assign to an object of its own type. [#3883](https://github.com/microsoft/vscode-cpptools/issues/3883)
2641
* Fix hover and Find All References for template function overloads. [#4044](https://github.com/microsoft/vscode-cpptools/issues/4044), [#4249](https://github.com/microsoft/vscode-cpptools/issues/4249)
@@ -46,7 +61,6 @@
4661
* Fix gcc problem matcher when the column is missing.
4762
* @guntern [PR #6490](https://github.com/microsoft/vscode-cpptools/pull/6490)
4863
* Disable Insiders prompt for Codespaces. [#6491](https://github.com/microsoft/vscode-cpptools/issues/6491)
49-
* Fix `compile_commands.json` not working correctly for `*.C` files. [#6497](https://github.com/microsoft/vscode-cpptools/issues/6497)
5064
* Show an error message when gdb can't be found when generating a `launch.json` (instead of using an invalid `miDebuggerPath`). [#6511](https://github.com/microsoft/vscode-cpptools/issues/6511)
5165
* Fix IntelliSense crash with a parenthesized type followed by an initializer list. [#6554](https://github.com/microsoft/vscode-cpptools/issues/6554), [#6624](https://github.com/microsoft/vscode-cpptools/issues/6624)
5266
* Fix IntelliSense updating after pasting multi-line code. [#6565](https://github.com/microsoft/vscode-cpptools/issues/6565)

Extension/package.json

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1989,6 +1989,23 @@
19891989
"description": "%c_cpp.debuggers.cppvsdbg.externalConsole.description%",
19901990
"default": false
19911991
},
1992+
"console": {
1993+
"type": "string",
1994+
"enum": [
1995+
"internalConsole",
1996+
"integratedTerminal",
1997+
"externalTerminal",
1998+
"newExternalWindow"
1999+
],
2000+
"enumDescriptions": [
2001+
"%c_cpp.debuggers.cppvsdbg.console.internalConsole.description%",
2002+
"%c_cpp.debuggers.cppvsdbg.console.integratedTerminal.description%",
2003+
"%c_cpp.debuggers.cppvsdbg.console.externalTerminal.description%",
2004+
"%c_cpp.debuggers.cppvsdbg.console.newExternalWindow.description%"
2005+
],
2006+
"description": "%c_cpp.debuggers.cppvsdbg.console.description%",
2007+
"default": "externalTerminal"
2008+
},
19922009
"sourceFileMap": {
19932010
"type": "object",
19942011
"description": "%c_cpp.debuggers.sourceFileMap.description%",
@@ -2730,7 +2747,7 @@
27302747
},
27312748
{
27322749
"description": "Visual Studio Windows Debugger",
2733-
"url": "https://go.microsoft.com/fwlink/?linkid=2152353",
2750+
"url": "https://go.microsoft.com/fwlink/?linkid=2153010",
27342751
"platforms": [
27352752
"win32"
27362753
],
@@ -2741,7 +2758,7 @@
27412758
"binaries": [
27422759
"./debugAdapters/vsdbg/bin/vsdbg.exe"
27432760
],
2744-
"integrity": "8299A112D1260C2CEA53AC74D18FA73DE8533C058AAAB254571B503FBAC37297"
2761+
"integrity": "52C4234976D527A7BF02EB2E8844F3C605DC4BD1D3847F83C8675CD23967BAB3"
27452762
}
27462763
]
27472764
}

Extension/package.nls.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,12 @@
213213
"c_cpp.debuggers.serverLaunchTimeout.description": "Optional time, in milliseconds, for the debugger to wait for the debugServer to start up. Default is 10000.",
214214
"c_cpp.debuggers.coreDumpPath.description": "Optional full path to a core dump file for the specified program. Defaults to null.",
215215
"c_cpp.debuggers.cppdbg.externalConsole.description": "If true, a console is launched for the debuggee. If false, on Linux and Windows, it will appear in the Integrated Console.",
216-
"c_cpp.debuggers.cppvsdbg.externalConsole.description": "If true, a console is launched for the debuggee. If false, no console is launched.",
216+
"c_cpp.debuggers.cppvsdbg.externalConsole.description": "[Deprecated by 'console'] If true, a console is launched for the debuggee. If false, no console is launched.",
217+
"c_cpp.debuggers.cppvsdbg.console.description": "Where to launch the debug target. Defaults to 'internalConsole' if not defined.",
218+
"c_cpp.debuggers.cppvsdbg.console.internalConsole.description": "Output to the VS Code Debug Console. This doesn't support reading console input (ex:'std::cin' or 'scanf')",
219+
"c_cpp.debuggers.cppvsdbg.console.integratedTerminal.description": "VS Code's integrated terminal",
220+
"c_cpp.debuggers.cppvsdbg.console.externalTerminal.description": "Console applications will be launched in an external terminal window. The window will be reused in relaunch scenarios, and will not automatically disappear when the application exits.",
221+
"c_cpp.debuggers.cppvsdbg.console.newExternalWindow.description": "Console applications will be launched in their own external console window which will end when the application stops. Non-console applications will run without a terminal, and stdout/stderr will be ignored.",
217222
"c_cpp.debuggers.avoidWindowsConsoleRedirection.description": "If true, disables debuggee console redirection that is required for Integrated Terminal support.",
218223
"c_cpp.debuggers.sourceFileMap.description": "Optional source file mappings passed to the debug engine. Example: '{ \"/original/source/path\":\"/current/source/path\" }'",
219224
"c_cpp.debuggers.processId.anyOf.description": "Optional process id to attach the debugger to. Use \"${command:pickProcess}\" to get a list of local running processes to attach to. Note that some platforms require administrator privileges in order to attach to a process.",

Extension/src/Debugger/configurationProvider.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ class CppConfigurationProvider implements vscode.DebugConfigurationProvider {
182182

183183
newConfig.name = compilerName + buildAndDebugActiveFileStr();
184184
newConfig.preLaunchTask = task.name;
185-
newConfig.externalConsole = false;
185+
newConfig.console = "externalTerminal";
186186
const exeName: string = path.join("${fileDirname}", "${fileBasenameNoExtension}");
187187
const isWindows: boolean = platform === 'win32';
188188
newConfig.program = isWindows ? exeName + ".exe" : exeName;
@@ -246,6 +246,15 @@ class CppConfigurationProvider implements vscode.DebugConfigurationProvider {
246246
}
247247

248248
if (config.type === 'cppvsdbg') {
249+
// Handle legacy 'externalConsole' bool and convert to console: "externalTerminal"
250+
if (config.hasOwnProperty("externalConsole")) {
251+
logger.getOutputChannelLogger().showWarningMessage(localize("debugger.deprecated.config", "The key '{0}' is deprecated. Please use '{1}' instead.", "externalConsole", "console"));
252+
if (config.externalConsole && !config.console) {
253+
config.console = "externalTerminal";
254+
}
255+
delete config.externalConsole;
256+
}
257+
249258
// Fail if cppvsdbg type is running on non-Windows
250259
if (os.platform() !== 'win32') {
251260
logger.getOutputChannelLogger().showWarningMessage(localize("debugger.not.available", "Debugger of type: '{0}' is only available on Windows. Use type: '{1}' on the current OS platform.", "cppvsdbg", "cppdbg"));

Extension/src/Debugger/configurations.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ function createLaunchString(name: string, type: string, executable: string): str
4444
"stopAtEntry": false,
4545
"cwd": "$\{workspaceFolder\}",
4646
"environment": [],
47-
"externalConsole": false
47+
"console": "externalTerminal"
4848
`;
4949
}
5050

Extension/src/LanguageServer/Providers/workspaceSymbolProvider.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,13 @@ export class WorkspaceSymbolProvider implements vscode.WorkspaceSymbolProvider {
2828
if (suffix.length) {
2929
name = name + ' (' + suffix + ')';
3030
}
31+
const range: vscode.Range = new vscode.Range(symbol.location.range.start.line, symbol.location.range.start.character, symbol.location.range.end.line, symbol.location.range.end.character);
32+
const uri: vscode.Uri = vscode.Uri.parse(symbol.location.uri.toString());
3133
const vscodeSymbol: vscode.SymbolInformation = new vscode.SymbolInformation(
3234
name,
3335
symbol.kind,
3436
symbol.containerName,
35-
symbol.location
37+
new vscode.Location(uri, range)
3638
);
3739
resultSymbols.push(vscodeSymbol);
3840
});

Extension/src/LanguageServer/client.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -302,10 +302,16 @@ export interface LocalizeDocumentSymbol {
302302
children: LocalizeDocumentSymbol[];
303303
}
304304

305+
/** Differs from vscode.Location, which has a uri of type vscode.Uri. */
306+
interface Location {
307+
uri: string;
308+
range: Range;
309+
}
310+
305311
interface LocalizeSymbolInformation {
306312
name: string;
307313
kind: vscode.SymbolKind;
308-
location: vscode.Location;
314+
location: Location;
309315
containerName: string;
310316
suffix: LocalizeStringParams;
311317
}

Extension/src/common.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -516,7 +516,7 @@ export function getInstalledBinaryPlatform(): string | undefined {
516516
return installedPlatform;
517517
}
518518

519-
/* Check if the core binaries exists in extension's installation folder */
519+
/** Check if the core binaries exists in extension's installation folder */
520520
export async function checkInstallBinariesExist(): Promise<boolean> {
521521
if (!checkInstallLockFile()) {
522522
return false;
@@ -540,7 +540,7 @@ export async function checkInstallBinariesExist(): Promise<boolean> {
540540
return installBinariesExist;
541541
}
542542

543-
/* Check if the core Json files exists in extension's installation folder */
543+
/** Check if the core Json files exists in extension's installation folder */
544544
export async function checkInstallJsonsExist(): Promise<boolean> {
545545
let installJsonsExist: boolean = true;
546546
const jsonFiles: string[] = [

Extension/tools/OptionsSchema.json

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -546,6 +546,23 @@
546546
"description": "%c_cpp.debuggers.cppvsdbg.externalConsole.description%",
547547
"default": false
548548
},
549+
"console": {
550+
"type": "string",
551+
"enum": [
552+
"internalConsole",
553+
"integratedTerminal",
554+
"externalTerminal",
555+
"newExternalWindow"
556+
],
557+
"enumDescriptions": [
558+
"%c_cpp.debuggers.cppvsdbg.console.internalConsole.description%",
559+
"%c_cpp.debuggers.cppvsdbg.console.integratedTerminal.description%",
560+
"%c_cpp.debuggers.cppvsdbg.console.externalTerminal.description%",
561+
"%c_cpp.debuggers.cppvsdbg.console.newExternalWindow.description%"
562+
],
563+
"description": "%c_cpp.debuggers.cppvsdbg.console.description%",
564+
"default": "internalConsole"
565+
},
549566
"sourceFileMap": {
550567
"type": "object",
551568
"description": "%c_cpp.debuggers.sourceFileMap.description%",

Extension/translations_auto_pr.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,10 @@ octokit.pulls.list({ owner: repoOwner, repo: repoName }).then(({data}) => {
150150
console.log(`Restoring default git permissions`);
151151
cp.execSync('git remote remove origin');
152152
cp.execSync(`git remote add origin https://github.com/${repoOwner}/${repoName}.git`);
153-
153+
154+
console.log(`Run 'git fetch' against updated remote`);
155+
cp.execSync('git fetch');
156+
154157
console.log(`Switching back to main (git checkout main)`);
155158
cp.execSync('git checkout main');
156159

0 commit comments

Comments
 (0)