@@ -1998,62 +1998,6 @@ mod cmd {
19981998 i.map(|i| (i, breakpoints.get(i).unwrap().clone()))
19991999 }
20002000
2001− fn edit_breakpoint_impl(
2002− cx: &mut compositor::Context,
2003− condition: Option<String>,
2004− log_message: Option<String>,
2005− ) -> anyhow::Result<()> {
2006− use helix_lsp::block_on;
2007−
2008− let (_, doc) = current!(cx.editor);
2009− let path = match doc.path() {
2010− Some(path) => path.to_path_buf(),
2011− None => {
2012− bail!("Can't edit breakpoint: document has no path")
2013− }
2014− };
2015−
2016− if let Some((pos, mut bp)) = get_breakpoint_at_current_line(cx.editor) {
2017− let breakpoints = cx.editor.breakpoints.entry(path.clone()).or_default();
2018− breakpoints.remove(pos);
2019−
2020− bp.condition = condition;
2021− bp.log_message = log_message;
2022− breakpoints.push(bp);
2023−
2024− if let Some(debugger) = &mut cx.editor.debugger {
2025− // TODO: handle capabilities correctly again, by filterin breakpoints when emitting
2026− // if breakpoint.condition.is_some()
2027− // && !debugger
2028− // .caps
2029− // .as_ref()
2030− // .unwrap()
2031− // .supports_conditional_breakpoints
2032− // .unwrap_or_default()
2033− // {
2034− // bail!(
2035− // "Can't edit breakpoint: debugger does not support conditional breakpoints"
2036− // )
2037− // }
2038− // if breakpoint.log_message.is_some()
2039− // && !debugger
2040− // .caps
2041− // .as_ref()
2042− // .unwrap()
2043− // .supports_log_points
2044− // .unwrap_or_default()
2045− // {
2046− // bail!("Can't edit breakpoint: debugger does not support logpoints")
2047− // }
2048− let request = debugger.set_breakpoints(path, breakpoints.clone());
2049− if let Err(e) = block_on(request) {
2050− bail!("Failed to set breakpoints: {:?}", e)
2051− }
2052− }
2053− }
2054− Ok(())
2055− }
2056−
20572001 fn debug_start(
20582002 cx: &mut compositor::Context,
20592003 args: &[&str],
@@ -2087,36 +2031,6 @@ mod cmd {
20872031 Ok(())
20882032 }
20892033
2090− fn debug_breakpoint_condition(
2091− cx: &mut compositor::Context,
2092− args: &[&str],
2093− _event: PromptEvent,
2094− ) -> anyhow::Result<()> {
2095− let condition = args.join(" ");
2096− let condition = if condition.is_empty() {
2097− None
2098− } else {
2099− Some(condition)
2100− };
2101−
2102− edit_breakpoint_impl(cx, condition, None)
2103− }
2104−
2105− fn debug_set_logpoint(
2106− cx: &mut compositor::Context,
2107− args: &[&str],
2108− _event: PromptEvent,
2109− ) -> anyhow::Result<()> {
2110− let log_message = args.join(" ");
2111− let log_message = if log_message.is_empty() {
2112− None
2113− } else {
2114− Some(log_message)
2115− };
2116−
2117− edit_breakpoint_impl(cx, None, log_message)
2118− }
2119−
21202034 pub const TYPABLE_COMMAND_LIST: &[TypableCommand] = &[
21212035 TypableCommand {
21222036 name: "quit",
@@ -2361,14 +2275,14 @@ mod cmd {
23612275 alias: Some("dbg"),
23622276 doc: "Start a debug session from a given template with given parameters.",
23632277 fun: debug_start,
2364− completer: Some(completers::filename),
2278+ completer: None,
23652279 },
23662280 TypableCommand {
23672281 name: "debug-remote",
23682282 alias: Some("dbg-tcp"),
23692283 doc: "Connect to a debug adapter by TCP address and start a debugging session from a given template with given parameters.",
23702284 fun: debug_remote,
2371− completer: Some(completers::filename),
2285+ completer: None,
23722286 },
23732287 TypableCommand {
23742288 name: "debug-eval",
@@ -2377,20 +2291,6 @@ mod cmd {
23772291 fun: debug_eval,
23782292 completer: None,
23792293 },
2380− TypableCommand {
2381− name: "debug-breakpoint-condition",
2382− alias: None,
2383− doc: "Set current breakpoint condition.",
2384− fun: debug_breakpoint_condition,
2385− completer: None,
2386− },
2387− TypableCommand {
2388− name: "debug-set-logpoint",
2389− alias: None,
2390− doc: "Make current breakpoint a log point.",
2391− fun: debug_set_logpoint,
2392− completer: None,
2393− },
23942294 TypableCommand {
23952295 name: "vsplit",
23962296 alias: Some("vs"),