Skip to content
This repository was archived by the owner on Oct 2, 2021. It is now read-only.

Make sure to return 1 response for each breakpoint#277

Merged
roblourens merged 2 commits intomicrosoft:masterfrom
digeff:patch_break_on_load_wrong_breakpoint_count
Feb 5, 2018
Merged

Make sure to return 1 response for each breakpoint#277
roblourens merged 2 commits intomicrosoft:masterfrom
digeff:patch_break_on_load_wrong_breakpoint_count

Conversation

@digeff
Copy link
Contributor

@digeff digeff commented Feb 5, 2018

Temporary fix for this issue.

Some clients fail if we don't return 1 response per request

@roblourens
Copy link
Member

Is this blocking or can we come up with a better solution?

@rakatyal
Copy link
Contributor

rakatyal commented Feb 5, 2018

@roblourens: It is blocking our tests inside VS because the debugger errors out and exits if we send bak one response for multiple breakpoints inside the setBreakpoint request.
I think this is not a neat way to do this. We should probably come up with some internal breakpoint structure which we can return for these requests. Would you know if something like this exists in the protocol?
But to unblock our tests, I am fine with this fix temporarily until we come up with a better way to do it. Thoughts?

@roblourens
Copy link
Member

Why weren't the tests failing before?

We need to send unverified responses for the other breakpoints. There are a couple helpers for this in ChromeDebugAdapter. That might be happening with this fix automatically.

@roblourens
Copy link
Member

roblourens commented Feb 5, 2018

I think that pushing empty objects is probably the right solution. What should happen, is we hit this line later: https://github.com/Microsoft/vscode-chrome-debug-core/blob/master/src/chrome/chromeDebugAdapter.ts#L1358 and return unverified BPs for each.

I'll test this a little then take the PR.

@roblourens
Copy link
Member

Would be better if it's in the breakOnLoadHelper though

@roblourens
Copy link
Member

Oh and also it should not be returning the actual response from the break on load BP. That could make the first BP look like it was moved to line 1.

@digeff
Copy link
Contributor Author

digeff commented Feb 5, 2018

Done

@rakatyal
Copy link
Contributor

rakatyal commented Feb 5, 2018

Perfect!

@roblourens roblourens merged commit c8a55e3 into microsoft:master Feb 5, 2018
@roblourens
Copy link
Member

Actually you should still await addStopOnEntryBreakpoint, right? I can add that.

@roblourens
Copy link
Member

Just published -core version 3.22.5

@digeff
Copy link
Contributor Author

digeff commented Feb 5, 2018

Please add it, I missed that..

@digeff digeff deleted the patch_break_on_load_wrong_breakpoint_count branch February 5, 2018 21:47
@roblourens
Copy link
Member

I did, it's in that release.

@digeff
Copy link
Contributor Author

digeff commented Feb 5, 2018

Thanks :)

@roblourens roblourens added this to the February 2018 milestone Mar 5, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants