Debug console tweaks (#29586)

Closes #ISSUE

Release Notes:

- N/A

---------

Co-authored-by: Anthony Eid <hello@anthonyeid.me>
Co-authored-by: Cole Miller <m@cole-miller.net>
This commit is contained in:
Conrad Irwin 2025-04-28 21:53:57 -06:00 committed by GitHub
parent 2beefc8158
commit ab180855de
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 135 additions and 149 deletions

View file

@ -1,5 +1,6 @@
use super::{
breakpoint_store::BreakpointStore,
dap_command::EvaluateCommand,
locators,
session::{self, Session, SessionStateEvent},
};
@ -897,19 +898,18 @@ impl DapStore {
.clone()
.unwrap_or_else(|| snapshot.text_for_range(range.clone()).collect());
let Ok(eval_task) = session.update(cx, |session, cx| {
session.evaluate(
let Ok(eval_task) = session.update(cx, |session, _| {
session.mode.request_dap(EvaluateCommand {
expression,
Some(EvaluateArgumentsContext::Variables),
Some(stack_frame_id),
None,
cx,
)
frame_id: Some(stack_frame_id),
source: None,
context: Some(EvaluateArgumentsContext::Variables),
})
}) else {
continue;
};
if let Some(response) = eval_task.await {
if let Some(response) = eval_task.await.log_err() {
inlay_hints.push(InlayHint {
position: snapshot.anchor_after(range.end),
label: InlayHintLabel::String(format!(": {}", response.result)),