extensions: Yet another PR for debugger touchups (#32822)
We'll now clean up DAP locators for unloaded extensions and load schemas proper I can now load a custom Ruby extensions with all bells and whistles and use it as my debugger. Release Notes: - N/A
This commit is contained in:
parent
d92d52b508
commit
0e794fa0ac
14 changed files with 262 additions and 45 deletions
|
@ -1149,6 +1149,12 @@ impl ExtensionStore {
|
|||
for (server_id, _) in extension.manifest.context_servers.iter() {
|
||||
self.proxy.unregister_context_server(server_id.clone(), cx);
|
||||
}
|
||||
for (adapter, _) in extension.manifest.debug_adapters.iter() {
|
||||
self.proxy.unregister_debug_adapter(adapter.clone());
|
||||
}
|
||||
for (locator, _) in extension.manifest.debug_locators.iter() {
|
||||
self.proxy.unregister_debug_locator(locator.clone());
|
||||
}
|
||||
}
|
||||
|
||||
self.wasm_extensions
|
||||
|
@ -1344,12 +1350,24 @@ impl ExtensionStore {
|
|||
.register_indexed_docs_provider(extension.clone(), provider_id.clone());
|
||||
}
|
||||
|
||||
for debug_adapter in &manifest.debug_adapters {
|
||||
this.proxy
|
||||
.register_debug_adapter(extension.clone(), debug_adapter.clone());
|
||||
for (debug_adapter, meta) in &manifest.debug_adapters {
|
||||
let mut path = root_dir.clone();
|
||||
path.push(Path::new(manifest.id.as_ref()));
|
||||
if let Some(schema_path) = &meta.schema_path {
|
||||
path.push(schema_path);
|
||||
} else {
|
||||
path.push("debug_adapter_schemas");
|
||||
path.push(Path::new(debug_adapter.as_ref()).with_extension("json"));
|
||||
}
|
||||
|
||||
this.proxy.register_debug_adapter(
|
||||
extension.clone(),
|
||||
debug_adapter.clone(),
|
||||
&path,
|
||||
);
|
||||
}
|
||||
|
||||
for debug_adapter in &manifest.debug_adapters {
|
||||
for debug_adapter in manifest.debug_locators.keys() {
|
||||
this.proxy
|
||||
.register_debug_locator(extension.clone(), debug_adapter.clone());
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue