From 0eee6e6cbcaf781d07d1e8ce84e316d2ebdaef32 Mon Sep 17 00:00:00 2001 From: Remco Smits Date: Wed, 5 Feb 2025 17:31:54 +0100 Subject: [PATCH] Comment out collab variable list for now Also commenting out an event that triggers the infinite loop. We want to revisited the collab stuff anyway so we decided to do it this way. --- crates/collab/src/tests/debug_panel_tests.rs | 880 +++++++++---------- crates/project/src/dap_command.rs | 2 +- 2 files changed, 441 insertions(+), 441 deletions(-) diff --git a/crates/collab/src/tests/debug_panel_tests.rs b/crates/collab/src/tests/debug_panel_tests.rs index 018e0260bf78a4..c68a795317adcf 100644 --- a/crates/collab/src/tests/debug_panel_tests.rs +++ b/crates/collab/src/tests/debug_panel_tests.rs @@ -1340,446 +1340,446 @@ async fn test_module_list( shutdown_client.await.unwrap(); } -#[gpui::test] -async fn test_variable_list( - host_cx: &mut TestAppContext, - remote_cx: &mut TestAppContext, - late_join_cx: &mut TestAppContext, -) { - let executor = host_cx.executor(); - let mut server = TestServer::start(executor).await; - - let (mut host_zed, mut remote_zed, mut late_join_zed) = - setup_three_member_test(&mut server, host_cx, remote_cx, late_join_cx).await; - - let (host_project_id, _worktree_id) = host_zed - .host_project(Some(json!({"test.txt": "one\ntwo\nthree\nfour\nfive"}))) - .await; - - remote_zed.join_project(host_project_id).await; - - let (_client_host, host_workspace, host_project, host_cx) = host_zed.expand().await; - let (_client_remote, remote_workspace, _remote_project, remote_cx) = remote_zed.expand().await; - - let task = host_project.update(host_cx, |project, cx| { - project.start_debug_session( - dap::DebugAdapterConfig { - label: "test config".into(), - kind: dap::DebugAdapterKind::Fake, - request: dap::DebugRequestType::Launch, - program: None, - cwd: None, - initialize_args: None, - }, - cx, - ) - }); - - let (session, client) = task.await.unwrap(); - - client - .on_request::(move |_, _| { - Ok(dap::Capabilities { - supports_step_back: Some(true), - ..Default::default() - }) - }) - .await; - - client.on_request::(move |_, _| Ok(())).await; - - let stack_frames = vec![dap::StackFrame { - id: 1, - name: "Stack Frame 1".into(), - source: Some(dap::Source { - name: Some("test.js".into()), - path: Some("/project/src/test.js".into()), - source_reference: None, - presentation_hint: None, - origin: None, - sources: None, - adapter_data: None, - checksums: None, - }), - line: 1, - column: 1, - end_line: None, - end_column: None, - can_restart: None, - instruction_pointer_reference: None, - module_id: None, - presentation_hint: None, - }]; - - let scopes = vec![Scope { - name: "Scope 1".into(), - presentation_hint: None, - variables_reference: 1, - named_variables: None, - indexed_variables: None, - expensive: false, - source: None, - line: None, - column: None, - end_line: None, - end_column: None, - }]; - - let variable_1 = Variable { - name: "variable 1".into(), - value: "1".into(), - type_: None, - presentation_hint: None, - evaluate_name: None, - variables_reference: 2, - named_variables: None, - indexed_variables: None, - memory_reference: None, - }; - - let variable_2 = Variable { - name: "variable 2".into(), - value: "2".into(), - type_: None, - presentation_hint: None, - evaluate_name: None, - variables_reference: 3, - named_variables: None, - indexed_variables: None, - memory_reference: None, - }; - - let variable_3 = Variable { - name: "variable 3".into(), - value: "hello world".into(), - type_: None, - presentation_hint: None, - evaluate_name: None, - variables_reference: 4, - named_variables: None, - indexed_variables: None, - memory_reference: None, - }; - - let variable_4 = Variable { - name: "variable 4".into(), - value: "hello world this is the final variable".into(), - type_: None, - presentation_hint: None, - evaluate_name: None, - variables_reference: 0, - named_variables: None, - indexed_variables: None, - memory_reference: None, - }; - - client - .on_request::({ - let stack_frames = std::sync::Arc::new(stack_frames.clone()); - move |_, args| { - assert_eq!(1, args.thread_id); - - Ok(dap::StackTraceResponse { - stack_frames: (*stack_frames).clone(), - total_frames: None, - }) - } - }) - .await; - - client - .on_request::({ - let scopes = Arc::new(scopes.clone()); - move |_, args| { - assert_eq!(1, args.frame_id); - - Ok(dap::ScopesResponse { - scopes: (*scopes).clone(), - }) - } - }) - .await; - - let first_variable_request = vec![variable_1.clone(), variable_2.clone()]; - - client - .on_request::({ - move |_, args| { - assert_eq!(1, args.variables_reference); - - Ok(dap::VariablesResponse { - variables: first_variable_request.clone(), - }) - } - }) - .await; - - client - .fake_event(dap::messages::Events::Stopped(dap::StoppedEvent { - reason: dap::StoppedEventReason::Pause, - description: None, - thread_id: Some(1), - preserve_focus_hint: None, - text: None, - all_threads_stopped: None, - hit_breakpoint_ids: None, - })) - .await; - - host_cx.run_until_parked(); - remote_cx.run_until_parked(); - - let local_debug_item = host_workspace.update(host_cx, |workspace, cx| { - let debug_panel = workspace.panel::(cx).unwrap(); - let active_debug_panel_item = debug_panel - .update(cx, |this, cx| this.active_debug_panel_item(cx)) - .unwrap(); - - assert_eq!( - 1, - debug_panel.update(cx, |this, cx| this.pane().unwrap().read(cx).items_len()) - ); - assert_eq!(client.id(), active_debug_panel_item.read(cx).client_id()); - assert_eq!(1, active_debug_panel_item.read(cx).thread_id()); - active_debug_panel_item - }); - - let remote_debug_item = remote_workspace.update(remote_cx, |workspace, cx| { - let debug_panel = workspace.panel::(cx).unwrap(); - let active_debug_panel_item = debug_panel - .update(cx, |this, cx| this.active_debug_panel_item(cx)) - .unwrap(); - - assert_eq!( - 1, - debug_panel.update(cx, |this, cx| this.pane().unwrap().read(cx).items_len()) - ); - assert_eq!(client.id(), active_debug_panel_item.read(cx).client_id()); - assert_eq!(1, active_debug_panel_item.read(cx).thread_id()); - active_debug_panel_item - }); - - let first_visual_entries = vec!["v Scope 1", " > variable 1", " > variable 2"]; - let first_variable_containers = vec![ - VariableContainer { - container_reference: scopes[0].variables_reference, - variable: variable_1.clone(), - depth: 1, - }, - VariableContainer { - container_reference: scopes[0].variables_reference, - variable: variable_2.clone(), - depth: 1, - }, - ]; - - local_debug_item - .update(host_cx, |this, _| this.variable_list().clone()) - .update(host_cx, |variable_list, cx| { - assert_eq!(1, variable_list.scopes().len()); - assert_eq!(scopes, variable_list.scopes().get(&1).unwrap().clone()); - assert_eq!(&first_variable_containers, &variable_list.variables()); - - variable_list.assert_visual_entries(first_visual_entries.clone(), cx); - }); - - client - .on_request::({ - let variables = Arc::new(vec![variable_3.clone()]); - move |_, args| { - assert_eq!(2, args.variables_reference); - - Ok(dap::VariablesResponse { - variables: (*variables).clone(), - }) - } - }) - .await; - - remote_debug_item - .update(remote_cx, |this, _| this.variable_list().clone()) - .update(remote_cx, |variable_list, cx| { - assert_eq!(1, variable_list.scopes().len()); - assert_eq!(scopes, variable_list.scopes().get(&1).unwrap().clone()); - assert_eq!(&first_variable_containers, &variable_list.variables()); - - variable_list.assert_visual_entries(first_visual_entries.clone(), cx); - - variable_list.toggle_variable(&scopes[0], &variable_1, 1, cx); - }); - - host_cx.run_until_parked(); - remote_cx.run_until_parked(); - - let second_req_variable_list = vec![ - VariableContainer { - container_reference: scopes[0].variables_reference, - variable: variable_1.clone(), - depth: 1, - }, - VariableContainer { - container_reference: variable_1.variables_reference, - variable: variable_3.clone(), - depth: 2, - }, - VariableContainer { - container_reference: scopes[0].variables_reference, - variable: variable_2.clone(), - depth: 1, - }, - ]; - - remote_debug_item - .update(remote_cx, |this, _| this.variable_list().clone()) - .update(remote_cx, |variable_list, cx| { - assert_eq!(1, variable_list.scopes().len()); - assert_eq!(3, variable_list.variables().len()); - assert_eq!(scopes, variable_list.scopes().get(&1).unwrap().clone()); - assert_eq!(&second_req_variable_list, &variable_list.variables()); - - variable_list.assert_visual_entries( - vec![ - "v Scope 1", - " v variable 1", - " > variable 3", - " > variable 2", - ], - cx, - ); - }); - - client - .on_request::({ - let variables = Arc::new(vec![variable_4.clone()]); - move |_, args| { - assert_eq!(3, args.variables_reference); - - Ok(dap::VariablesResponse { - variables: (*variables).clone(), - }) - } - }) - .await; - - local_debug_item - .update(host_cx, |this, _| this.variable_list().clone()) - .update(host_cx, |variable_list, cx| { - assert_eq!(1, variable_list.scopes().len()); - assert_eq!(3, variable_list.variables().len()); - assert_eq!(scopes, variable_list.scopes().get(&1).unwrap().clone()); - assert_eq!(&second_req_variable_list, &variable_list.variables()); - - variable_list.assert_visual_entries(first_visual_entries.clone(), cx); - - variable_list.toggle_variable(&scopes[0], &variable_2.clone(), 1, cx); - }); - - host_cx.run_until_parked(); - remote_cx.run_until_parked(); - - let final_variable_containers: Vec = vec![ - VariableContainer { - container_reference: scopes[0].variables_reference, - variable: variable_1.clone(), - depth: 1, - }, - VariableContainer { - container_reference: variable_1.variables_reference, - variable: variable_3.clone(), - depth: 2, - }, - VariableContainer { - container_reference: scopes[0].variables_reference, - variable: variable_2.clone(), - depth: 1, - }, - VariableContainer { - container_reference: variable_2.variables_reference, - variable: variable_4.clone(), - depth: 2, - }, - ]; - - remote_debug_item - .update(remote_cx, |this, _| this.variable_list().clone()) - .update(remote_cx, |variable_list, cx| { - assert_eq!(1, variable_list.scopes().len()); - assert_eq!(4, variable_list.variables().len()); - assert_eq!(scopes, variable_list.scopes().get(&1).unwrap().clone()); - assert_eq!(&final_variable_containers, &variable_list.variables()); - - variable_list.assert_visual_entries( - vec![ - "v Scope 1", - " v variable 1", - " > variable 3", - " > variable 2", - ], - cx, - ); - }); - - local_debug_item - .update(host_cx, |this, _| this.variable_list().clone()) - .update(host_cx, |variable_list, cx| { - assert_eq!(1, variable_list.scopes().len()); - assert_eq!(4, variable_list.variables().len()); - assert_eq!(scopes, variable_list.scopes().get(&1).unwrap().clone()); - assert_eq!(&final_variable_containers, &variable_list.variables()); - - variable_list.assert_visual_entries( - vec![ - "v Scope 1", - " > variable 1", - " v variable 2", - " > variable 4", - ], - cx, - ); - }); - - late_join_zed.join_project(host_project_id).await; - let (_late_join_client, late_join_workspace, _late_join_project, late_join_cx) = - late_join_zed.expand().await; - - late_join_cx.run_until_parked(); - - let last_join_remote_item = late_join_workspace.update(late_join_cx, |workspace, cx| { - let debug_panel = workspace.panel::(cx).unwrap(); - let active_debug_panel_item = debug_panel - .update(cx, |this, cx| this.active_debug_panel_item(cx)) - .unwrap(); - - assert_eq!( - 1, - debug_panel.update(cx, |this, cx| this.pane().unwrap().read(cx).items_len()) - ); - assert_eq!(client.id(), active_debug_panel_item.read(cx).client_id()); - assert_eq!(1, active_debug_panel_item.read(cx).thread_id()); - active_debug_panel_item - }); - - last_join_remote_item - .update(late_join_cx, |this, _| this.variable_list().clone()) - .update(late_join_cx, |variable_list, cx| { - assert_eq!(1, variable_list.scopes().len()); - assert_eq!(4, variable_list.variables().len()); - assert_eq!(scopes, variable_list.scopes().get(&1).unwrap().clone()); - assert_eq!(final_variable_containers, variable_list.variables()); - - variable_list.assert_visual_entries(first_visual_entries, cx); - }); - - client.on_request::(move |_, _| Ok(())).await; - - let shutdown_client = host_project.update(host_cx, |project, cx| { - project.dap_store().update(cx, |dap_store, cx| { - dap_store.shutdown_session(&session.read(cx).id(), cx) - }) - }); - - shutdown_client.await.unwrap(); -} +// #[gpui::test] +// async fn test_variable_list( +// host_cx: &mut TestAppContext, +// remote_cx: &mut TestAppContext, +// late_join_cx: &mut TestAppContext, +// ) { +// let executor = host_cx.executor(); +// let mut server = TestServer::start(executor).await; + +// let (mut host_zed, mut remote_zed, mut late_join_zed) = +// setup_three_member_test(&mut server, host_cx, remote_cx, late_join_cx).await; + +// let (host_project_id, _worktree_id) = host_zed +// .host_project(Some(json!({"test.txt": "one\ntwo\nthree\nfour\nfive"}))) +// .await; + +// remote_zed.join_project(host_project_id).await; + +// let (_client_host, host_workspace, host_project, host_cx) = host_zed.expand().await; +// let (_client_remote, remote_workspace, _remote_project, remote_cx) = remote_zed.expand().await; + +// let task = host_project.update(host_cx, |project, cx| { +// project.start_debug_session( +// dap::DebugAdapterConfig { +// label: "test config".into(), +// kind: dap::DebugAdapterKind::Fake, +// request: dap::DebugRequestType::Launch, +// program: None, +// cwd: None, +// initialize_args: None, +// }, +// cx, +// ) +// }); + +// let (session, client) = task.await.unwrap(); + +// client +// .on_request::(move |_, _| { +// Ok(dap::Capabilities { +// supports_step_back: Some(true), +// ..Default::default() +// }) +// }) +// .await; + +// client.on_request::(move |_, _| Ok(())).await; + +// let stack_frames = vec![dap::StackFrame { +// id: 1, +// name: "Stack Frame 1".into(), +// source: Some(dap::Source { +// name: Some("test.js".into()), +// path: Some("/project/src/test.js".into()), +// source_reference: None, +// presentation_hint: None, +// origin: None, +// sources: None, +// adapter_data: None, +// checksums: None, +// }), +// line: 1, +// column: 1, +// end_line: None, +// end_column: None, +// can_restart: None, +// instruction_pointer_reference: None, +// module_id: None, +// presentation_hint: None, +// }]; + +// let scopes = vec![Scope { +// name: "Scope 1".into(), +// presentation_hint: None, +// variables_reference: 1, +// named_variables: None, +// indexed_variables: None, +// expensive: false, +// source: None, +// line: None, +// column: None, +// end_line: None, +// end_column: None, +// }]; + +// let variable_1 = Variable { +// name: "variable 1".into(), +// value: "1".into(), +// type_: None, +// presentation_hint: None, +// evaluate_name: None, +// variables_reference: 2, +// named_variables: None, +// indexed_variables: None, +// memory_reference: None, +// }; + +// let variable_2 = Variable { +// name: "variable 2".into(), +// value: "2".into(), +// type_: None, +// presentation_hint: None, +// evaluate_name: None, +// variables_reference: 3, +// named_variables: None, +// indexed_variables: None, +// memory_reference: None, +// }; + +// let variable_3 = Variable { +// name: "variable 3".into(), +// value: "hello world".into(), +// type_: None, +// presentation_hint: None, +// evaluate_name: None, +// variables_reference: 4, +// named_variables: None, +// indexed_variables: None, +// memory_reference: None, +// }; + +// let variable_4 = Variable { +// name: "variable 4".into(), +// value: "hello world this is the final variable".into(), +// type_: None, +// presentation_hint: None, +// evaluate_name: None, +// variables_reference: 0, +// named_variables: None, +// indexed_variables: None, +// memory_reference: None, +// }; + +// client +// .on_request::({ +// let stack_frames = std::sync::Arc::new(stack_frames.clone()); +// move |_, args| { +// assert_eq!(1, args.thread_id); + +// Ok(dap::StackTraceResponse { +// stack_frames: (*stack_frames).clone(), +// total_frames: None, +// }) +// } +// }) +// .await; + +// client +// .on_request::({ +// let scopes = Arc::new(scopes.clone()); +// move |_, args| { +// assert_eq!(1, args.frame_id); + +// Ok(dap::ScopesResponse { +// scopes: (*scopes).clone(), +// }) +// } +// }) +// .await; + +// let first_variable_request = vec![variable_1.clone(), variable_2.clone()]; + +// client +// .on_request::({ +// move |_, args| { +// assert_eq!(1, args.variables_reference); + +// Ok(dap::VariablesResponse { +// variables: first_variable_request.clone(), +// }) +// } +// }) +// .await; + +// client +// .fake_event(dap::messages::Events::Stopped(dap::StoppedEvent { +// reason: dap::StoppedEventReason::Pause, +// description: None, +// thread_id: Some(1), +// preserve_focus_hint: None, +// text: None, +// all_threads_stopped: None, +// hit_breakpoint_ids: None, +// })) +// .await; + +// host_cx.run_until_parked(); +// remote_cx.run_until_parked(); + +// let local_debug_item = host_workspace.update(host_cx, |workspace, cx| { +// let debug_panel = workspace.panel::(cx).unwrap(); +// let active_debug_panel_item = debug_panel +// .update(cx, |this, cx| this.active_debug_panel_item(cx)) +// .unwrap(); + +// assert_eq!( +// 1, +// debug_panel.update(cx, |this, cx| this.pane().unwrap().read(cx).items_len()) +// ); +// assert_eq!(client.id(), active_debug_panel_item.read(cx).client_id()); +// assert_eq!(1, active_debug_panel_item.read(cx).thread_id()); +// active_debug_panel_item +// }); + +// let remote_debug_item = remote_workspace.update(remote_cx, |workspace, cx| { +// let debug_panel = workspace.panel::(cx).unwrap(); +// let active_debug_panel_item = debug_panel +// .update(cx, |this, cx| this.active_debug_panel_item(cx)) +// .unwrap(); + +// assert_eq!( +// 1, +// debug_panel.update(cx, |this, cx| this.pane().unwrap().read(cx).items_len()) +// ); +// assert_eq!(client.id(), active_debug_panel_item.read(cx).client_id()); +// assert_eq!(1, active_debug_panel_item.read(cx).thread_id()); +// active_debug_panel_item +// }); + +// let first_visual_entries = vec!["v Scope 1", " > variable 1", " > variable 2"]; +// let first_variable_containers = vec![ +// VariableContainer { +// container_reference: scopes[0].variables_reference, +// variable: variable_1.clone(), +// depth: 1, +// }, +// VariableContainer { +// container_reference: scopes[0].variables_reference, +// variable: variable_2.clone(), +// depth: 1, +// }, +// ]; + +// local_debug_item +// .update(host_cx, |this, _| this.variable_list().clone()) +// .update(host_cx, |variable_list, cx| { +// assert_eq!(1, variable_list.scopes().len()); +// assert_eq!(scopes, variable_list.scopes().get(&1).unwrap().clone()); +// assert_eq!(&first_variable_containers, &variable_list.variables()); + +// variable_list.assert_visual_entries(first_visual_entries.clone(), cx); +// }); + +// client +// .on_request::({ +// let variables = Arc::new(vec![variable_3.clone()]); +// move |_, args| { +// assert_eq!(2, args.variables_reference); + +// Ok(dap::VariablesResponse { +// variables: (*variables).clone(), +// }) +// } +// }) +// .await; + +// remote_debug_item +// .update(remote_cx, |this, _| this.variable_list().clone()) +// .update(remote_cx, |variable_list, cx| { +// assert_eq!(1, variable_list.scopes().len()); +// assert_eq!(scopes, variable_list.scopes().get(&1).unwrap().clone()); +// assert_eq!(&first_variable_containers, &variable_list.variables()); + +// variable_list.assert_visual_entries(first_visual_entries.clone(), cx); + +// variable_list.toggle_variable(&scopes[0], &variable_1, 1, cx); +// }); + +// host_cx.run_until_parked(); +// remote_cx.run_until_parked(); + +// let second_req_variable_list = vec![ +// VariableContainer { +// container_reference: scopes[0].variables_reference, +// variable: variable_1.clone(), +// depth: 1, +// }, +// VariableContainer { +// container_reference: variable_1.variables_reference, +// variable: variable_3.clone(), +// depth: 2, +// }, +// VariableContainer { +// container_reference: scopes[0].variables_reference, +// variable: variable_2.clone(), +// depth: 1, +// }, +// ]; + +// remote_debug_item +// .update(remote_cx, |this, _| this.variable_list().clone()) +// .update(remote_cx, |variable_list, cx| { +// assert_eq!(1, variable_list.scopes().len()); +// assert_eq!(3, variable_list.variables().len()); +// assert_eq!(scopes, variable_list.scopes().get(&1).unwrap().clone()); +// assert_eq!(&second_req_variable_list, &variable_list.variables()); + +// variable_list.assert_visual_entries( +// vec![ +// "v Scope 1", +// " v variable 1", +// " > variable 3", +// " > variable 2", +// ], +// cx, +// ); +// }); + +// client +// .on_request::({ +// let variables = Arc::new(vec![variable_4.clone()]); +// move |_, args| { +// assert_eq!(3, args.variables_reference); + +// Ok(dap::VariablesResponse { +// variables: (*variables).clone(), +// }) +// } +// }) +// .await; + +// local_debug_item +// .update(host_cx, |this, _| this.variable_list().clone()) +// .update(host_cx, |variable_list, cx| { +// assert_eq!(1, variable_list.scopes().len()); +// assert_eq!(3, variable_list.variables().len()); +// assert_eq!(scopes, variable_list.scopes().get(&1).unwrap().clone()); +// assert_eq!(&second_req_variable_list, &variable_list.variables()); + +// variable_list.assert_visual_entries(first_visual_entries.clone(), cx); + +// variable_list.toggle_variable(&scopes[0], &variable_2.clone(), 1, cx); +// }); + +// host_cx.run_until_parked(); +// remote_cx.run_until_parked(); + +// let final_variable_containers: Vec = vec![ +// VariableContainer { +// container_reference: scopes[0].variables_reference, +// variable: variable_1.clone(), +// depth: 1, +// }, +// VariableContainer { +// container_reference: variable_1.variables_reference, +// variable: variable_3.clone(), +// depth: 2, +// }, +// VariableContainer { +// container_reference: scopes[0].variables_reference, +// variable: variable_2.clone(), +// depth: 1, +// }, +// VariableContainer { +// container_reference: variable_2.variables_reference, +// variable: variable_4.clone(), +// depth: 2, +// }, +// ]; + +// remote_debug_item +// .update(remote_cx, |this, _| this.variable_list().clone()) +// .update(remote_cx, |variable_list, cx| { +// assert_eq!(1, variable_list.scopes().len()); +// assert_eq!(4, variable_list.variables().len()); +// assert_eq!(scopes, variable_list.scopes().get(&1).unwrap().clone()); +// assert_eq!(&final_variable_containers, &variable_list.variables()); + +// variable_list.assert_visual_entries( +// vec![ +// "v Scope 1", +// " v variable 1", +// " > variable 3", +// " > variable 2", +// ], +// cx, +// ); +// }); + +// local_debug_item +// .update(host_cx, |this, _| this.variable_list().clone()) +// .update(host_cx, |variable_list, cx| { +// assert_eq!(1, variable_list.scopes().len()); +// assert_eq!(4, variable_list.variables().len()); +// assert_eq!(scopes, variable_list.scopes().get(&1).unwrap().clone()); +// assert_eq!(&final_variable_containers, &variable_list.variables()); + +// variable_list.assert_visual_entries( +// vec![ +// "v Scope 1", +// " > variable 1", +// " v variable 2", +// " > variable 4", +// ], +// cx, +// ); +// }); + +// late_join_zed.join_project(host_project_id).await; +// let (_late_join_client, late_join_workspace, _late_join_project, late_join_cx) = +// late_join_zed.expand().await; + +// late_join_cx.run_until_parked(); + +// let last_join_remote_item = late_join_workspace.update(late_join_cx, |workspace, cx| { +// let debug_panel = workspace.panel::(cx).unwrap(); +// let active_debug_panel_item = debug_panel +// .update(cx, |this, cx| this.active_debug_panel_item(cx)) +// .unwrap(); + +// assert_eq!( +// 1, +// debug_panel.update(cx, |this, cx| this.pane().unwrap().read(cx).items_len()) +// ); +// assert_eq!(client.id(), active_debug_panel_item.read(cx).client_id()); +// assert_eq!(1, active_debug_panel_item.read(cx).thread_id()); +// active_debug_panel_item +// }); + +// last_join_remote_item +// .update(late_join_cx, |this, _| this.variable_list().clone()) +// .update(late_join_cx, |variable_list, cx| { +// assert_eq!(1, variable_list.scopes().len()); +// assert_eq!(4, variable_list.variables().len()); +// assert_eq!(scopes, variable_list.scopes().get(&1).unwrap().clone()); +// assert_eq!(final_variable_containers, variable_list.variables()); + +// variable_list.assert_visual_entries(first_visual_entries, cx); +// }); + +// client.on_request::(move |_, _| Ok(())).await; + +// let shutdown_client = host_project.update(host_cx, |project, cx| { +// project.dap_store().update(cx, |dap_store, cx| { +// dap_store.shutdown_session(&session.read(cx).id(), cx) +// }) +// }); + +// shutdown_client.await.unwrap(); +// } #[gpui::test] async fn test_ignore_breakpoints( diff --git a/crates/project/src/dap_command.rs b/crates/project/src/dap_command.rs index 8cd22873c4ee02..0840220c4dd372 100644 --- a/crates/project/src/dap_command.rs +++ b/crates/project/src/dap_command.rs @@ -846,7 +846,7 @@ impl DapCommand for VariablesCommand { }; downstream_clients.send(update.clone()).log_err(); - cx.emit(crate::dap_store::DapStoreEvent::UpdateDebugAdapter(update)); + // cx.emit(crate::dap_store::DapStoreEvent::UpdateDebugAdapter(update)); } })?;