Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions Extension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4859,6 +4859,11 @@
]
},
"default": []
},
"ignoreRunWithoutDebuggingWarnings": {
"type": "boolean",
"description": "%c_cpp.debuggers.ignoreRunWithoutDebuggingWarnings.description%",
"default": false
}
Comment thread
bobbrow marked this conversation as resolved.
}
},
Expand Down Expand Up @@ -5895,6 +5900,11 @@
}
}
}
},
"ignoreRunWithoutDebuggingWarnings": {
"type": "boolean",
"description": "%c_cpp.debuggers.ignoreRunWithoutDebuggingWarnings.description%",
"default": false
}
Comment thread
bobbrow marked this conversation as resolved.
}
},
Expand Down
1 change: 1 addition & 0 deletions Extension/package.nls.json
Original file line number Diff line number Diff line change
Expand Up @@ -1026,6 +1026,7 @@
"c_cpp.debuggers.VSSymbolOptionsModuleFilter.excludedModules.description": "Array of modules that the debugger should NOT load symbols for. Wildcards (example: MyCompany.*.dll) are supported.\n\nThis property is ignored unless 'mode' is set to 'loadAllButExcluded'.",
"c_cpp.debuggers.VSSymbolOptionsModuleFilter.includedModules.description": "Array of modules that the debugger should load symbols for. Wildcards (example: MyCompany.*.dll) are supported.\n\nThis property is ignored unless 'mode' is set to 'loadOnlyIncluded'.",
"c_cpp.debuggers.VSSymbolOptionsModuleFilter.includeSymbolsNextToModules.description": "If true, for any module NOT in the 'includedModules' array, the debugger will still check next to the module itself and the launching executable, but it will not check paths on the symbol search list. This option defaults to 'true'.\n\nThis property is ignored unless 'mode' is set to 'loadOnlyIncluded'.",
"c_cpp.debuggers.ignoreRunWithoutDebuggingWarnings.description": "If true, no warning will be logged when run without debugging fails to launch the program in the terminal.",
"c_cpp.semanticTokenTypes.referenceType.description": "Style for C++/CLI reference types.",
"c_cpp.semanticTokenTypes.cliProperty.description": "Style for C++/CLI properties.",
"c_cpp.semanticTokenTypes.genericType.description": "Style for C++/CLI generic types.",
Expand Down
21 changes: 16 additions & 5 deletions Extension/src/Debugger/debugAdapterDescriptorFactory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,21 +86,32 @@ function noDebugSupported(configuration: vscode.DebugConfiguration): boolean {
}

function logReasonForNoDebugNotSupported(configuration: vscode.DebugConfiguration): void {
if (configuration.ignoreRunWithoutDebuggingWarnings === true) {
return;
}

const disallowedProperties: string[] = [];
const outputChannel = getOutputChannel();
outputChannel.show(true);

if (configuration.request !== 'launch') {
outputChannel.appendLine(localize("debugger.noDebug.requestType.not.supported", "Run Without Debugging is only supported for launch configurations."));
return;
}
if (configuration.pipeTransport) {
outputChannel.appendLine(localize("debugger.noDebug.pipeTransport.not.supported", "Run Without Debugging is not supported for configurations with 'pipeTransport' set."));
disallowedProperties.push('pipeTransport');
}
if (configuration.debugServerPath) {
outputChannel.appendLine(localize("debugger.noDebug.debugServerPath.not.supported", "Run Without Debugging is not supported for configurations with 'debugServerPath' set."));
disallowedProperties.push('debugServerPath');
}
if (configuration.miDebuggerServerAddress) {
outputChannel.appendLine(localize("debugger.noDebug.miDebuggerServerAddress.not.supported", "Run Without Debugging is not supported for configurations with 'miDebuggerServerAddress' set."));
disallowedProperties.push('miDebuggerServerAddress');
}
if (configuration.coreDumpPath) {
outputChannel.appendLine(localize("debugger.noDebug.coreDumpPath.not.supported", "Run Without Debugging is not supported for configurations with 'coreDumpPath' set."));
disallowedProperties.push('coreDumpPath');
}
outputChannel.show(true);
outputChannel.appendLine(localize("debugger.unsupported.properties", "Launch configurations with the following properties cannot be run directly in the terminal: {0}", disallowedProperties.join(', ')));
outputChannel.appendLine(localize("debugger.fallback.message", "Program output will appear in the Debug Console instead."));
outputChannel.appendLine(localize("debugger.fallback.message2", "To suppress this warning, set the 'ignoreRunWithoutDebuggingWarnings' property to true in your launch configuration."));
}

10 changes: 10 additions & 0 deletions Extension/tools/OptionsSchema.json
Original file line number Diff line number Diff line change
Expand Up @@ -847,6 +847,11 @@
},
"deploySteps": {
"$ref": "#/definitions/DeploySteps"
},
"ignoreRunWithoutDebuggingWarnings": {
"type": "boolean",
"description": "%c_cpp.debuggers.ignoreRunWithoutDebuggingWarnings.description%",
"default": false
}
Comment thread
bobbrow marked this conversation as resolved.
}
},
Expand Down Expand Up @@ -1118,6 +1123,11 @@
"searchPaths": [],
"searchMicrosoftSymbolServer": false
}
},
"ignoreRunWithoutDebuggingWarnings": {
"type": "boolean",
"description": "%c_cpp.debuggers.ignoreRunWithoutDebuggingWarnings.description%",
"default": false
}
Comment thread
bobbrow marked this conversation as resolved.
}
},
Expand Down
Loading