Skip to content

Commit 54fa34a

Browse files
Merge branch 'topic/eng/ide/ada_language_server#1590' into 'master'
Disable questions on multiple matches for GDB See merge request eng/ide/ada_language_server!1896
2 parents 0e50e1a + 062ae7d commit 54fa34a

File tree

3 files changed

+42
-9
lines changed

3 files changed

+42
-9
lines changed

integration/vscode/ada/package.json

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1033,11 +1033,18 @@
10331033
"stopAtEntry": false,
10341034
"externalConsole": false,
10351035
"preLaunchTask": "ada: Build current project",
1036-
"setupCommands": {
1037-
"description": "Enable pretty-printing for gdb",
1038-
"text": "-enable-pretty-printing",
1039-
"ignoreFailures": true
1040-
}
1036+
"setupCommands": [
1037+
{
1038+
"description": "Enable pretty-printing for gdb",
1039+
"text": "-enable-pretty-printing",
1040+
"ignoreFailures": true
1041+
},
1042+
{
1043+
"description": "Disable questions on multiple matches",
1044+
"text": "set multiple-symbols cancel",
1045+
"ignoreFailures": false
1046+
}
1047+
]
10411048
}
10421049
}
10431050
],

integration/vscode/ada/src/debugConfigProvider.ts

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,6 @@ export function initializeConfig(main: AdaMain, name?: string): AdaConfig {
182182
type: ADA_DEBUG_BACKEND_TYPE,
183183
name: name ?? (main ? `Ada: Debug main - ${main.mainRelPath()}` : 'Ada: Debugger Launch'),
184184
request: 'launch',
185-
targetArchitecture: process.arch,
186185
cwd: '${workspaceFolder}',
187186
program: main
188187
? `\${workspaceFolder}/${main.execRelPath()}`
@@ -295,14 +294,23 @@ export class AdaInitialDebugConfigProvider implements vscode.DebugConfigurationP
295294
}
296295

297296
/**
298-
* GDB default setup options
297+
* GDB default setup options.
298+
* We enable pretty-printing by default and disable questions
299+
* on multiple matches due to an issue with vscode-cpptools
300+
* GDB integration
301+
* (see https://github.com/microsoft/vscode-cpptools/issues/11953)
299302
*/
300303
const setupCmd = [
301304
{
302305
description: 'Enable pretty-printing for gdb',
303306
text: '-enable-pretty-printing',
304307
ignoreFailures: true,
305308
},
309+
{
310+
description: 'Disable questions on multiple matches',
311+
text: 'set multiple-symbols cancel',
312+
ignoreFailures: false,
313+
},
306314
];
307315

308316
interface QuickPickAdaMain extends vscode.QuickPickItem {

integration/vscode/ada/test/general/debug.test.ts

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ suite('Dbg Cfgs', function () {
1919
type: 'cppdbg',
2020
name: 'Ada: Debug main - src/main1.adb',
2121
request: 'launch',
22-
targetArchitecture: 'x64',
2322
cwd: '${workspaceFolder}',
2423
program: '${workspaceFolder}/obj/main1exec' + exe,
2524
stopAtEntry: false,
@@ -33,6 +32,11 @@ suite('Dbg Cfgs', function () {
3332
text: '-enable-pretty-printing',
3433
ignoreFailures: true,
3534
},
35+
{
36+
description: 'Disable questions on multiple matches',
37+
ignoreFailures: false,
38+
text: 'set multiple-symbols cancel',
39+
},
3640
],
3741
miDebuggerPath: getOrFindGdb() ?? '<undefined>',
3842
},
@@ -49,14 +53,18 @@ suite('Dbg Cfgs', function () {
4953
text: '-enable-pretty-printing',
5054
ignoreFailures: true,
5155
},
56+
{
57+
description: 'Disable questions on multiple matches',
58+
ignoreFailures: false,
59+
text: 'set multiple-symbols cancel',
60+
},
5261
],
5362
miDebuggerPath: getOrFindGdb() ?? '<undefined>',
5463
},
5564
{
5665
type: 'cppdbg',
5766
name: 'Ada: Debug main - src/test.adb',
5867
request: 'launch',
59-
targetArchitecture: 'x64',
6068
cwd: '${workspaceFolder}',
6169
program: '${workspaceFolder}/obj/test' + exe,
6270
stopAtEntry: false,
@@ -70,6 +78,11 @@ suite('Dbg Cfgs', function () {
7078
text: '-enable-pretty-printing',
7179
ignoreFailures: true,
7280
},
81+
{
82+
description: 'Disable questions on multiple matches',
83+
ignoreFailures: false,
84+
text: 'set multiple-symbols cancel',
85+
},
7386
],
7487
miDebuggerPath: getOrFindGdb() ?? '<undefined>',
7588
},
@@ -86,6 +99,11 @@ suite('Dbg Cfgs', function () {
8699
text: '-enable-pretty-printing',
87100
ignoreFailures: true,
88101
},
102+
{
103+
description: 'Disable questions on multiple matches',
104+
ignoreFailures: false,
105+
text: 'set multiple-symbols cancel',
106+
},
89107
],
90108
miDebuggerPath: getOrFindGdb() ?? '<undefined>',
91109
},

0 commit comments

Comments
 (0)