debugger: Add locator for Python tasks (#31533)
Closes #ISSUE Release Notes: - debugger: Python tests/main functions can now we debugged from the gutter. --------- Co-authored-by: Kirill Bulatov <kirill@zed.dev>
This commit is contained in:
parent
15d59fcda9
commit
c0a5ace8b8
6 changed files with 118 additions and 3 deletions
|
@ -101,7 +101,9 @@ impl DapStore {
|
|||
pub fn init(client: &AnyProtoClient, cx: &mut App) {
|
||||
static ADD_LOCATORS: Once = Once::new();
|
||||
ADD_LOCATORS.call_once(|| {
|
||||
DapRegistry::global(cx).add_locator(Arc::new(locators::cargo::CargoLocator {}))
|
||||
let registry = DapRegistry::global(cx);
|
||||
registry.add_locator(Arc::new(locators::cargo::CargoLocator {}));
|
||||
registry.add_locator(Arc::new(locators::python::PythonLocator));
|
||||
});
|
||||
client.add_entity_request_handler(Self::handle_run_debug_locator);
|
||||
client.add_entity_request_handler(Self::handle_get_debug_adapter_binary);
|
||||
|
@ -412,7 +414,6 @@ impl DapStore {
|
|||
this.get_debug_adapter_binary(definition.clone(), session_id, console, cx)
|
||||
})?
|
||||
.await?;
|
||||
|
||||
session
|
||||
.update(cx, |session, cx| {
|
||||
session.boot(binary, worktree, dap_store, cx)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue