debugger: Filter out debug scenarios with invalid Adapters from debug picker (#35744)
I also removed a debug assertion that wasn't true when a debug session was restarting through a request, because there wasn't a booting task Zed needed to run before the session. I renamed SessionState::Building to SessionState::Booting as well, because building implies that we're building code while booting the session covers more cases and is more accurate. Release Notes: - debugger: Filter out more invalid debug configurations from the debug picker Co-authored-by: Remco Smits <djsmits12@gmail.com>
This commit is contained in:
parent
a5dd8d0052
commit
3ea90e397b
7 changed files with 38 additions and 27 deletions
|
@ -74,6 +74,12 @@ impl Borrow<str> for DebugAdapterName {
|
|||
}
|
||||
}
|
||||
|
||||
impl Borrow<SharedString> for DebugAdapterName {
|
||||
fn borrow(&self) -> &SharedString {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
|
||||
impl std::fmt::Display for DebugAdapterName {
|
||||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||
std::fmt::Display::fmt(&self.0, f)
|
||||
|
|
|
@ -87,7 +87,7 @@ impl DapRegistry {
|
|||
self.0.read().adapters.get(name).cloned()
|
||||
}
|
||||
|
||||
pub fn enumerate_adapters(&self) -> Vec<DebugAdapterName> {
|
||||
pub fn enumerate_adapters<B: FromIterator<DebugAdapterName>>(&self) -> B {
|
||||
self.0.read().adapters.keys().cloned().collect()
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue