vscode icon indicating copy to clipboard operation
vscode copied to clipboard

Breakpoint is duplicated if line is moved while editing the breakpoint condition

Open edumunoz opened this issue 10 years ago • 6 comments

  • VSCode Version: 1.2.0 stable
  • OS Version: Tried it on OS X 10.10.5 and Ubuntu 16.04

Steps to Reproduce:

  1. Open a file where breakpoints are supported
  2. Set a breakpoint at any line
  3. Right click the breakpoint and select "Edit Breakpoint"
  4. While the "Edit Breakpoint" dialog is open, move the line where the breakpoint is set
  5. Hit Enter to confirm the "Edit Breakpoint" dialog
  6. The breakpoint gets duplicated, but it should just move like it does if escape is pressed instead of Enter.

Note that this reproes without actually starting debugging.

Here's a recording of the repro:

double_breakpoint_repro

@isidorn @weinand

edumunoz avatar Jun 07 '16 20:06 edumunoz

@isidorn editing (or moving focus) should dismiss the peek.

weinand avatar Jun 07 '16 20:06 weinand

@weinand, something to keep in mind is sometimes you might want to copy & paste a value from code into the condition of the breakpoint, which your suggested fix does not totally prevent, but makes it a little harder.

I'm ok with the suggestion, though. I just wanted to bring that up.

edumunoz avatar Jun 07 '16 23:06 edumunoz

@weinand we already had this discussin with @stevencl on whether focus lost should close the breakpoint widget and we came to the conlucission to not do that. One of the reasons is as @edumunoz points out - users might want to copy & paste. Though we try to make it easy for the user to close the widget by simple pressing esc when focus is anywhere.

isidorn avatar Jun 13 '16 13:06 isidorn

The issue here is that the breakpoint widget is talking about line 75 (as it correctly says in the message) and once you dismiss the widget with an enter that means you have entered a condition and a brekapoint on line 75 gets added. Though in the meantime you have moved the breakpoint on line 75 a couple of lines down. Thus in the end you get 2 breakpoints

I understand this can be a bit confuzing to the user - but not very important imho -> backlog

isidorn avatar Jun 15 '16 10:06 isidorn

Closing as 'do not plan to fix'. Will reopen if users complain about this behavior.

isidorn avatar Sep 02 '16 13:09 isidorn

Removing the "bug" tag so that this does not appear in the "need to be verified" list

ramya-rao-a avatar Sep 28 '16 23:09 ramya-rao-a