Skip to content

Commit 2727652

Browse files
authored
Add debuginfod launch option to cppdbg debugger schema (#14471)
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.
1 parent 90f2ed1 commit 2727652

3 files changed

Lines changed: 67 additions & 0 deletions

File tree

Extension/package.json

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4364,6 +4364,24 @@
43644364
"default": "throw",
43654365
"description": "%c_cpp.debuggers.unknownBreakpointHandling.description%"
43664366
},
4367+
"debuginfod": {
4368+
"description": "%c_cpp.debuggers.debuginfod.description%",
4369+
"default": {},
4370+
"type": "object",
4371+
"properties": {
4372+
"enabled": {
4373+
"type": "boolean",
4374+
"description": "%c_cpp.debuggers.debuginfod.enabled.description%",
4375+
"default": true
4376+
},
4377+
"timeout": {
4378+
"type": "integer",
4379+
"description": "%c_cpp.debuggers.debuginfod.timeout.description%",
4380+
"minimum": 0,
4381+
"default": 30
4382+
}
4383+
}
4384+
},
43674385
"variables": {
43684386
"type": "object",
43694387
"description": "%c_cpp.debuggers.variables.description%",
@@ -4964,6 +4982,24 @@
49644982
}
49654983
]
49664984
},
4985+
"debuginfod": {
4986+
"description": "%c_cpp.debuggers.debuginfod.description%",
4987+
"default": {},
4988+
"type": "object",
4989+
"properties": {
4990+
"enabled": {
4991+
"type": "boolean",
4992+
"description": "%c_cpp.debuggers.debuginfod.enabled.description%",
4993+
"default": true
4994+
},
4995+
"timeout": {
4996+
"type": "integer",
4997+
"description": "%c_cpp.debuggers.debuginfod.timeout.description%",
4998+
"minimum": 0,
4999+
"default": 30
5000+
}
5001+
}
5002+
},
49675003
"logging": {
49685004
"description": "%c_cpp.debuggers.logging.description%",
49695005
"type": "object",

Extension/package.nls.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1011,6 +1011,9 @@
10111011
"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.",
10121012
"c_cpp.debuggers.symbolOptions.description": "Options to control how symbols (.pdb files) are found and loaded.",
10131013
"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\".",
1014+
"c_cpp.debuggers.debuginfod.description": "Controls GDB's debuginfod behavior for downloading debug symbols from debuginfod servers.",
1015+
"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.",
1016+
"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).",
10141017
"c_cpp.debuggers.VSSymbolOptions.description": "Provides configuration for locating and loading symbols to the debug adapter.",
10151018
"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.",
10161019
"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'.",

Extension/tools/OptionsSchema.json

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,24 @@
238238
}
239239
}
240240
},
241+
"Debuginfod": {
242+
"type": "object",
243+
"description": "%c_cpp.debuggers.debuginfod.description%",
244+
"default": {},
245+
"properties": {
246+
"enabled": {
247+
"type": "boolean",
248+
"description": "%c_cpp.debuggers.debuginfod.enabled.description%",
249+
"default": true
250+
},
251+
"timeout": {
252+
"type": "integer",
253+
"description": "%c_cpp.debuggers.debuginfod.timeout.description%",
254+
"minimum": 0,
255+
"default": 30
256+
}
257+
}
258+
},
241259
"Variables": {
242260
"type": "object",
243261
"description": "%c_cpp.debuggers.variables.description%",
@@ -819,6 +837,11 @@
819837
"default": "throw",
820838
"description": "%c_cpp.debuggers.unknownBreakpointHandling.description%"
821839
},
840+
"debuginfod": {
841+
"$ref": "#/definitions/Debuginfod",
842+
"description": "%c_cpp.debuggers.debuginfod.description%",
843+
"default": {}
844+
},
822845
"variables": {
823846
"$ref": "#/definitions/Variables"
824847
},
@@ -921,6 +944,11 @@
921944
}
922945
]
923946
},
947+
"debuginfod": {
948+
"$ref": "#/definitions/Debuginfod",
949+
"description": "%c_cpp.debuggers.debuginfod.description%",
950+
"default": {}
951+
},
924952
"logging": {
925953
"$ref": "#/definitions/Logging",
926954
"description": "%c_cpp.debuggers.logging.description%"

0 commit comments

Comments
 (0)