Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple column breakpoints that get folded together remain "duplicated" #25389

Closed
alexdima opened this issue Apr 26, 2017 · 5 comments
Closed
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug debug Debug viewlet, configurations, breakpoints, adapter issues verified Verification succeeded
Milestone

Comments

@alexdima
Copy link
Member

alexdima commented Apr 26, 2017

Testing #25194

Have the following source code:

function fib(n) { if ((n === 1) || (n === 0)) { return 1; } else { return fib(n - 1) + fib(n - 2); } }
console.log(fib(10));

Use Shift+F9 to add N breakpoints, in between each letter on the fib line (about 100). Use https://nodejs.org/download/nightly/v8.0.0-nightly201703249ff7ed23cd/

Press play without a debug configuration. Notice that the breakpoints have been folded together in the editor, and pressing F5 acts as if there would be a single breakpoint at a position, but the breakpoint list shows many "duplicated" breakpoints:

image

@isidorn
Copy link
Contributor

isidorn commented Apr 26, 2017

I guess we could remove duplicate breakpoints (those that have the same line & column) however should this be done on the adapter side or on the vscode side.
Feels to me like vscode should do this so that each adapter should not worry about this. However I am not sure if by doing this we are limiting some scenario

fyi @weinand

@isidorn isidorn added the under-discussion Issue is under discussion for relevance, priority, approach label Apr 26, 2017
@roblourens
Copy link
Member

roblourens commented Apr 26, 2017

I don't think the adapter can remove breakpoints. It can only return a location for them. It would be nice for VS Code to de-dupe but we have to think about the UX in the case where a user sets a BP in some location, and the adapter returns a location that already exists. It could look like the BP just disappeared or failed to be set. When we show a dupe in the bp list, the user can figure out what happened, although it's still not really obvious. This happens a lot when setting multiple column BPs on a line.

@isidorn isidorn added this to the May 2017 milestone Apr 27, 2017
@isidorn isidorn added bug Issue identified by VS Code Team member as probable bug debug Debug viewlet, configurations, breakpoints, adapter issues and removed under-discussion Issue is under discussion for relevance, priority, approach labels May 9, 2017
@isidorn isidorn closed this as completed in 8d4d6e6 May 9, 2017
@isidorn
Copy link
Contributor

isidorn commented May 9, 2017

After discussing with @weinand we have two models of handling duplicate brekapoints

  1. We always show also the intent of the user and the real position, thus there would be ne duplicates in this case and they would all be unique
  2. We never show the intent of the user and only show the real position. This is what we are doing now and in this case it makes sense to automatically remove duplicate breakpoints since we are ignoring the "intent" of the user.

We decided to go with the second approach for now and if we see users complaing we can reconsider to go back to the first option

@roblourens
Copy link
Member

What will they see when a breakpoint is set, and it's moved to the same location as another? If it looks like nothing happened, that might be confusing.

@isidorn
Copy link
Contributor

isidorn commented May 10, 2017

@roblourens There will be a slight flicker after which it looks like nothing happened. Yes, this might be confusing but I suggest we wait for bugs from users.

@chrmarti chrmarti added the verified Verification succeeded label Jun 6, 2017
@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 17, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug debug Debug viewlet, configurations, breakpoints, adapter issues verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

4 participants