
@cole-miller found a root cause of our struggles with attach scenarios; we did not fetch .so files necessary for attaching to work, as we were downloading DebugPy source tarballs from GitHub. This PR does away with it by setting up a virtualenv instead that has debugpy installed. Closes #34660 Closes #34575 Release Notes: - debugger: Fixed attaching with DebugPy. DebugPy is now installed automatically from pip (instead of GitHub), unless it is present in active virtual environment. Additionally this should resolve any startup issues with missing .so on Linux.
40 lines
1.1 KiB
Rust
40 lines
1.1 KiB
Rust
mod codelldb;
|
|
mod gdb;
|
|
mod go;
|
|
mod javascript;
|
|
mod python;
|
|
|
|
use std::sync::Arc;
|
|
|
|
use anyhow::Result;
|
|
use async_trait::async_trait;
|
|
use codelldb::CodeLldbDebugAdapter;
|
|
use dap::{
|
|
DapRegistry,
|
|
adapters::{
|
|
self, AdapterVersion, DapDelegate, DebugAdapter, DebugAdapterBinary, DebugAdapterName,
|
|
},
|
|
configure_tcp_connection,
|
|
};
|
|
use gdb::GdbDebugAdapter;
|
|
use go::GoDebugAdapter;
|
|
use gpui::{App, BorrowAppContext};
|
|
use javascript::JsDebugAdapter;
|
|
use python::PythonDebugAdapter;
|
|
use serde_json::json;
|
|
use task::{DebugScenario, ZedDebugConfig};
|
|
|
|
pub fn init(cx: &mut App) {
|
|
cx.update_default_global(|registry: &mut DapRegistry, _cx| {
|
|
registry.add_adapter(Arc::from(CodeLldbDebugAdapter::default()));
|
|
registry.add_adapter(Arc::from(PythonDebugAdapter::default()));
|
|
registry.add_adapter(Arc::from(JsDebugAdapter::default()));
|
|
registry.add_adapter(Arc::from(GoDebugAdapter::default()));
|
|
registry.add_adapter(Arc::from(GdbDebugAdapter));
|
|
|
|
#[cfg(any(test, feature = "test-support"))]
|
|
{
|
|
registry.add_adapter(Arc::from(dap::FakeAdapter {}));
|
|
}
|
|
})
|
|
}
|