debugger: Mark DapLocator::create_scenario as an async function (#32680)

Paves way for locators in extensions.

Release Notes:

- N/A
This commit is contained in:
Piotr Osiewicz 2025-06-13 13:19:03 +02:00 committed by GitHub
parent 2c491d3a66
commit d5b8c21a75
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 290 additions and 218 deletions

View file

@ -287,11 +287,17 @@ impl DapStore {
adapter: DebugAdapterName,
label: SharedString,
cx: &mut App,
) -> Option<DebugScenario> {
DapRegistry::global(cx)
.locators()
.values()
.find_map(|locator| locator.create_scenario(&build, &label, adapter.clone()))
) -> Task<Option<DebugScenario>> {
let locators = DapRegistry::global(cx).locators();
cx.background_spawn(async move {
for locator in locators.values() {
if let Some(scenario) = locator.create_scenario(&build, &label, &adapter).await {
return Some(scenario);
}
}
None
})
}
pub fn run_debug_locator(