1#[cfg(target_os = "windows")]
7pub fn wait_for_debugger() {
8 loop {
9 if unsafe { windows::Win32::System::Diagnostics::Debug::IsDebuggerPresent().as_bool() } {
10 #[cfg(feature = "tracing")]
11 tracing::info!("Debugger found.");
12 break;
13 } else {
14 #[cfg(feature = "tracing")]
15 tracing::info!("Waiting for debugger.");
16 std::thread::sleep(std::time::Duration::from_secs(5));
17 }
18 }
19}
20
21#[cfg(target_os = "linux")]
22pub fn wait_for_debugger() {}
23
24#[cfg(target_os = "macos")]
26pub fn wait_for_debugger() {}