File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
adapter/codelldb/src/debug_session Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -37,12 +37,14 @@ impl super::DebugSession {
3737 self . set_target ( target) ;
3838 self . send_event ( EventBody :: initialized) ;
3939
40- let term_fut = self . create_terminal ( & args) ;
4140 let mut config_done_recv = self . configuration_done_sender . subscribe ( ) ;
4241 let self_ref = self . self_ref . clone ( ) ;
4342 let fut = async move {
44- term_fut. await ;
43+ // Work around https://github.com/microsoft/vscode/issues/231074 by pausing before sending the
44+ // `runInTerminal` message. This gives VSCode the chance to process `output` messages we sent earlier.
45+ tokio:: time:: sleep ( time:: Duration :: from_millis ( 100 ) ) . await ;
4546 log_errors ! ( config_done_recv. recv( ) . await ) ;
47+ self_ref. map ( |s| s. create_terminal ( & args) ) . await . await ;
4648 self_ref. map ( |s| s. complete_launch ( args) ) . await
4749 } ;
4850 Err ( AsyncResponse ( Box :: new ( fut) ) . into ( ) )
You can’t perform that action at this time.
0 commit comments