@@ -5,7 +5,10 @@ use crate::{
5 job::Callback,
5 job::Callback,
6 ui::{FilePicker, Prompt, PromptEvent},
6 ui::{FilePicker, Prompt, PromptEvent},
8−use helix_core::{syntax::DebugConfigCompletion, Selection};
9+ syntax::{DebugArgumentValue, DebugConfigCompletion},
9use helix_dap::{self as dap, Client, ThreadId};
12use helix_dap::{self as dap, Client, ThreadId};
10use helix_lsp::block_on;
13use helix_lsp::block_on;
@@ -239,13 +242,26 @@ pub fn dap_start_impl(
241 // For param #0 replace {0} in args
244 // For param #0 replace {0} in args
245+ value = match value {
246+ DebugArgumentValue::String(v) => {
242− value = value.replace(format!("{{{}}}", i).as_str(), ¶m);
247+ DebugArgumentValue::String(v.replace(format!("{{{}}}", i).as_str(), ¶m))
249+ DebugArgumentValue::Array(arr) => DebugArgumentValue::Array(
251+ .map(|v| v.replace(format!("{{{}}}", i).as_str(), ¶m))
257+ if let DebugArgumentValue::String(string) = value {
245− if let Ok(integer) = value.parse::<usize>() {
258+ if let Ok(integer) = string.parse::<usize>() {
246− args.insert(k, Value::Number(serde_json::Number::from(integer)));
259+ args.insert(k, to_value(integer).unwrap());
247− } else {
260+ } else {
248− args.insert(k, Value::String(value));
261+ args.insert(k, to_value(string).unwrap());
263+ } else if let DebugArgumentValue::Array(arr) = value {
264+ args.insert(k, to_value(arr).unwrap());