-
Notifications
You must be signed in to change notification settings - Fork 60
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'topic/mi-debugger-path' into 'master'
Set GDB path explicitly in VS Code debug configurations Closes #1277 See merge request eng/ide/ada_language_server!1483
- Loading branch information
Showing
9 changed files
with
161 additions
and
79 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
import assert from 'assert'; | ||
import { suite, test } from 'mocha'; | ||
import { AdaConfig, adaDynamicDebugConfigProvider } from '../../../src/debugConfigProvider'; | ||
import { activate } from '../utils'; | ||
|
||
suite('Debug Configurations', function () { | ||
this.beforeAll(async () => { | ||
await activate(); | ||
}); | ||
|
||
test('GDB path is explicitely set in offered debug config', async () => { | ||
const firstConfig = (await adaDynamicDebugConfigProvider.provideDebugConfigurations()).at( | ||
0 | ||
) as AdaConfig; | ||
|
||
assert.notEqual(firstConfig.miDebuggerPath, undefined); | ||
}); | ||
|
||
test('GDB path is the same for all configs', async () => { | ||
const configs = | ||
(await adaDynamicDebugConfigProvider.provideDebugConfigurations()) as AdaConfig[]; | ||
|
||
assert(configs.length > 1); | ||
const miDebuggerPath = configs.at(0)?.miDebuggerPath; | ||
assert.notEqual(miDebuggerPath, ''); | ||
for (let i = 0; i < configs.length; i++) { | ||
const c = configs[i]; | ||
assert.equal(c.miDebuggerPath, miDebuggerPath); | ||
} | ||
}); | ||
|
||
test('Two debug configs per main are proposed', async () => { | ||
const configs = | ||
(await adaDynamicDebugConfigProvider.provideDebugConfigurations()) as AdaConfig[]; | ||
const expected = ` | ||
Ada: Debug main - src/main1.adb | ||
Ada: Attach debugger to running process - src/main1.adb | ||
Ada: Debug main - src/test.adb | ||
Ada: Attach debugger to running process - src/test.adb`.trim(); | ||
assert.equal(configs.map((v) => `${v.name}`).join('\n'), expected); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.