From bb9481a19603d249d4e37d1b8a169b4e927bd26c Mon Sep 17 00:00:00 2001 From: mattisafur <46404761+mattisafur@users.noreply.github.com> Date: Sat, 12 Apr 2025 22:39:43 +0300 Subject: [PATCH] set stdio values to None when given an empty string --- adapter/codelldb/src/debug_session/launch.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/adapter/codelldb/src/debug_session/launch.rs b/adapter/codelldb/src/debug_session/launch.rs index 20c762a3..a94af19a 100644 --- a/adapter/codelldb/src/debug_session/launch.rs +++ b/adapter/codelldb/src/debug_session/launch.rs @@ -428,6 +428,16 @@ impl super::DebugSession { Some(Either::First(ref stdio)) => vec![Some(stdio.clone())], // A single string Some(Either::Second(ref stdio)) => stdio.clone(), // List of strings }; + + // replace empty strings with None + for entry in stdio.iter_mut() { + if let Some(path) = entry { + if path.is_empty() { + *entry = None; + } + } + } + // Pad to at least 3 entries while stdio.len() < 3 { stdio.push(None)