Add IntelliSense support for `debugConfig.console` (#2479)
This commit is contained in:
Родитель
ecdc6ab238
Коммит
5ead5b1d5f
|
@ -18,6 +18,7 @@ package-lock.json
|
|||
test.txt
|
||||
*.backup
|
||||
*.db*
|
||||
*.log
|
||||
*.vsix
|
||||
**/.vscode/CMakeTools
|
||||
**/nls.*.json
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
Improvements:
|
||||
- Fix build Error: EMFILE: too many open files. [#2288](https://github.com/microsoft/vscode-cmake-tools/issues/2288) [@FrogTheFrog](https://github.com/FrogTheFrog)
|
||||
- Add commands to get preset names. [PR #2433](https://github.com/microsoft/vscode-cmake-tools/pull/2433)
|
||||
- Add IntelliSense support for `debugConfig.console`. [#2428](https://github.com/microsoft/vscode-cmake-tools/issues/2428)
|
||||
- Add c++23 support. [#2475](https://github.com/microsoft/vscode-cmake-tools/issues/2475) [@sweemer](https://github.com/sweemer)
|
||||
|
||||
Bug Fixes:
|
||||
|
|
20
package.json
20
package.json
|
@ -1223,8 +1223,24 @@
|
|||
"description": "%cmake-tools.configuration.cmake.debugConfig.additionalSOLibSearchPath.description%"
|
||||
},
|
||||
"externalConsole": {
|
||||
"type": "boolean",
|
||||
"description": "%cmake-tools.configuration.cmake.debugConfig.externalConsole.description%"
|
||||
"type": "boolean",
|
||||
"description": "%cmake-tools.configuration.cmake.debugConfig.externalConsole.description%"
|
||||
},
|
||||
"console": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"internalConsole",
|
||||
"integratedTerminal",
|
||||
"externalTerminal",
|
||||
"newExternalWindow"
|
||||
],
|
||||
"enumDescriptions": [
|
||||
"%cmake-tools.configuration.cmake.debugConfig.console.internalConsole.description%",
|
||||
"%cmake-tools.configuration.cmake.debugConfig.console.integratedTerminal.description%",
|
||||
"%cmake-tools.configuration.cmake.debugConfig.console.externalTerminal.description%",
|
||||
"%cmake-tools.configuration.cmake.debugConfig.console.newExternalWindow.description%"
|
||||
],
|
||||
"description": "%cmake-tools.configuration.cmake.debugConfig.console.description%"
|
||||
},
|
||||
"logging": {
|
||||
"type": "object",
|
||||
|
|
|
@ -84,6 +84,11 @@
|
|||
"cmake-tools.configuration.cmake.debugConfig.symbolSearchPath.description": "Visual Studio debugger symbol search paths.",
|
||||
"cmake-tools.configuration.cmake.debugConfig.additionalSOLibSearchPath.description": "Paths for GDB or LLDB to search for .so files.",
|
||||
"cmake-tools.configuration.cmake.debugConfig.externalConsole.description": "Launch an external console for the program.",
|
||||
"cmake-tools.configuration.cmake.debugConfig.console.description": "Where to launch the debug target. Defaults to 'internalConsole' if not defined.",
|
||||
"cmake-tools.configuration.cmake.debugConfig.console.internalConsole.description": "Output to the VS Code Debug Console. This doesn't support reading console input (ex:'std::cin' or 'scanf').",
|
||||
"cmake-tools.configuration.cmake.debugConfig.console.integratedTerminal.description": "VS Code's integrated terminal.",
|
||||
"cmake-tools.configuration.cmake.debugConfig.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.",
|
||||
"cmake-tools.configuration.cmake.debugConfig.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.",
|
||||
"cmake-tools.configuration.cmake.debugConfig.logging.description": "Tell what types of messages should be logged to the console.",
|
||||
"cmake-tools.configuration.cmake.debugConfig.visualizerFile.description": ".natvis file to be used when debugging.",
|
||||
"cmake-tools.configuration.cmake.debugConfig.args.description": "Arguments to pass to program command line.",
|
||||
|
|
|
@ -32,6 +32,7 @@ export interface CppDebugConfiguration {
|
|||
symbolSearchPath?: string;
|
||||
additionalSOLibSearchPath?: string;
|
||||
externalConsole?: boolean;
|
||||
console?: ConsoleTypes;
|
||||
logging?: DebuggerLogging;
|
||||
visualizerFile?: string;
|
||||
args?: string[];
|
||||
|
@ -62,6 +63,18 @@ export interface SetupCommand {
|
|||
ignoreFailures?: boolean;
|
||||
}
|
||||
|
||||
export enum MIModes {
|
||||
lldb = 'lldb',
|
||||
gdb = 'gdb',
|
||||
}
|
||||
|
||||
export enum ConsoleTypes {
|
||||
internalConsole = 'internalConsole',
|
||||
integratedTerminal = 'integratedTerminal',
|
||||
externalTerminal = 'externalTerminal',
|
||||
newExternalWindow = 'newExternalWindow'
|
||||
}
|
||||
|
||||
async function createGDBDebugConfiguration(debuggerPath: string, target: ExecutableTarget): Promise<VSCodeDebugConfiguration> {
|
||||
if (!await checkDebugger(debuggerPath)) {
|
||||
debuggerPath = 'gdb';
|
||||
|
@ -149,10 +162,6 @@ function searchForCompilerPathInCache(cache: CMakeCache): string | null {
|
|||
return null;
|
||||
}
|
||||
|
||||
export enum MIModes {
|
||||
lldb = 'lldb',
|
||||
gdb = 'gdb',
|
||||
}
|
||||
export async function getDebugConfigurationFromCache(cache: CMakeCache, target: ExecutableTarget, platform: string,
|
||||
modeOverride?: MIModes, debuggerPathOverride?: string):
|
||||
Promise<VSCodeDebugConfiguration | null> {
|
||||
|
|
Загрузка…
Ссылка в новой задаче