From 5e1783b3f21a63072fcc3c68924c2f9b7ec06156 Mon Sep 17 00:00:00 2001 From: Andrew Wang Date: Thu, 21 May 2026 17:46:32 -0700 Subject: [PATCH] Add debuginfod launch option to cppdbg debugger schema Add the `debuginfod` configuration option to both launch and attach configurations for the cppdbg debugger type. This exposes the MIEngine debuginfod settings (enabled/timeout) so users can control GDB's debuginfod behavior and prevent hangs when debuginfod servers are unreachable. --- Extension/package.json | 36 ++++++++++++++++++++++++++++++ Extension/package.nls.json | 3 +++ Extension/tools/OptionsSchema.json | 28 +++++++++++++++++++++++ 3 files changed, 67 insertions(+) diff --git a/Extension/package.json b/Extension/package.json index c9e0d6958..27dc816e8 100644 --- a/Extension/package.json +++ b/Extension/package.json @@ -4362,6 +4362,24 @@ "default": "throw", "description": "%c_cpp.debuggers.unknownBreakpointHandling.description%" }, + "debuginfod": { + "description": "%c_cpp.debuggers.debuginfod.description%", + "default": {}, + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "description": "%c_cpp.debuggers.debuginfod.enabled.description%", + "default": true + }, + "timeout": { + "type": "integer", + "description": "%c_cpp.debuggers.debuginfod.timeout.description%", + "minimum": 0, + "default": 30 + } + } + }, "variables": { "type": "object", "description": "%c_cpp.debuggers.variables.description%", @@ -4962,6 +4980,24 @@ } ] }, + "debuginfod": { + "description": "%c_cpp.debuggers.debuginfod.description%", + "default": {}, + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "description": "%c_cpp.debuggers.debuginfod.enabled.description%", + "default": true + }, + "timeout": { + "type": "integer", + "description": "%c_cpp.debuggers.debuginfod.timeout.description%", + "minimum": 0, + "default": 30 + } + } + }, "logging": { "description": "%c_cpp.debuggers.logging.description%", "type": "object", diff --git a/Extension/package.nls.json b/Extension/package.nls.json index 92efdda00..fa21f1c46 100644 --- a/Extension/package.nls.json +++ b/Extension/package.nls.json @@ -1011,6 +1011,9 @@ "c_cpp.debuggers.sourceFileMap.sourceFileMapEntry.useForBreakpoints.description": "False if this entry is only used for stack frame location mapping. True if this entry should also be used when specifying breakpoint locations.", "c_cpp.debuggers.symbolOptions.description": "Options to control how symbols (.pdb files) are found and loaded.", "c_cpp.debuggers.unknownBreakpointHandling.description": "Controls how breakpoints set externally (usually via raw GDB commands) are handled when hit.\nAllowed values are \"throw\", which acts as if an exception was thrown by the application, and \"stop\", which only pauses the debug session. The default value is \"throw\".", + "c_cpp.debuggers.debuginfod.description": "Controls GDB's debuginfod behavior for downloading debug symbols from debuginfod servers.", + "c_cpp.debuggers.debuginfod.enabled.description": "If true (default), GDB's debuginfod support is enabled. Set to false to prevent GDB from contacting debuginfod servers.", + "c_cpp.debuggers.debuginfod.timeout.description": "The timeout in seconds for debuginfod server requests. Default is 30. Set to 0 to use GDB/libdebuginfod defaults (no override).", "c_cpp.debuggers.VSSymbolOptions.description": "Provides configuration for locating and loading symbols to the debug adapter.", "c_cpp.debuggers.VSSymbolOptions.searchPaths.description": "Array of symbol server URLs (example: http\u200b://MyExampleSymbolServer) or directories (example: /build/symbols) to search for .pdb files. These directories will be searched in addition to the default locations -- next to the module and the path where the pdb was originally dropped to.", "c_cpp.debuggers.VSSymbolOptions.searchMicrosoftSymbolServer.description": "If 'true' the Microsoft Symbol server (https\u200b://msdl.microsoft.com\u200b/download/symbols) is added to the symbols search path. If unspecified, this option defaults to 'false'.", diff --git a/Extension/tools/OptionsSchema.json b/Extension/tools/OptionsSchema.json index 29ad6476a..4198d1f2f 100644 --- a/Extension/tools/OptionsSchema.json +++ b/Extension/tools/OptionsSchema.json @@ -238,6 +238,24 @@ } } }, + "Debuginfod": { + "type": "object", + "description": "%c_cpp.debuggers.debuginfod.description%", + "default": {}, + "properties": { + "enabled": { + "type": "boolean", + "description": "%c_cpp.debuggers.debuginfod.enabled.description%", + "default": true + }, + "timeout": { + "type": "integer", + "description": "%c_cpp.debuggers.debuginfod.timeout.description%", + "minimum": 0, + "default": 30 + } + } + }, "Variables": { "type": "object", "description": "%c_cpp.debuggers.variables.description%", @@ -819,6 +837,11 @@ "default": "throw", "description": "%c_cpp.debuggers.unknownBreakpointHandling.description%" }, + "debuginfod": { + "$ref": "#/definitions/Debuginfod", + "description": "%c_cpp.debuggers.debuginfod.description%", + "default": {} + }, "variables": { "$ref": "#/definitions/Variables" }, @@ -921,6 +944,11 @@ } ] }, + "debuginfod": { + "$ref": "#/definitions/Debuginfod", + "description": "%c_cpp.debuggers.debuginfod.description%", + "default": {} + }, "logging": { "$ref": "#/definitions/Logging", "description": "%c_cpp.debuggers.logging.description%"