|
|
@ -273,11 +273,14 @@ impl Application {
|
|
|
|
..
|
|
|
|
..
|
|
|
|
}) => {
|
|
|
|
}) => {
|
|
|
|
debugger.is_running = false;
|
|
|
|
debugger.is_running = false;
|
|
|
|
let main = debugger
|
|
|
|
let main = debugger.threads().await.ok().and_then(|threads| {
|
|
|
|
.threads()
|
|
|
|
// Workaround for debugging Go tests. Main thread has * in beginning of its name
|
|
|
|
.await
|
|
|
|
let mut main = threads.iter().find(|t| t.name.starts_with('*')).cloned();
|
|
|
|
.ok()
|
|
|
|
if main.is_none() {
|
|
|
|
.and_then(|threads| threads.get(0).cloned());
|
|
|
|
main = threads.get(0).cloned();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
main
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
if let Some(main) = main {
|
|
|
|
if let Some(main) = main {
|
|
|
|
let (bt, _) = debugger.stack_trace(main.id).await.unwrap();
|
|
|
|
let (bt, _) = debugger.stack_trace(main.id).await.unwrap();
|
|
|
|