You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
All breakpoints in a file become "unverified" when adding/removing breakpoints #4599
(and what's slightly confusing is that a verified breakpoint is visible behind the execution market, but an unverified breakpoint is not - so although it looks like the one on the yellow line disappears, it doesn't, it's still there and grey once I step away)
Logs for a breakpoint request that leaves things in this state..
We removed the old breakpoints from the VM, add the new ones (and get BreakpointAdded), but we then respond with unverified:false for everything, and never generate any DAP events to mark them as verified.
This seems to be a timing/ordering issue. The BreakpointAdded event comes before the response to add the breakpoint:
// Send a request to add a breakpoint to the VM
==> [VM] {"jsonrpc":"2.0","id":"917","method":"addBreakpointWithScriptUri","params":{"isolateId":"isolates/478628281828835","scriptUri":"file:///C:/Dev/Test%20Projects/flutter_counter/test/widget_test.dart","line":16}}
// Get the BreakpointAdded event
<== [VM] {"jsonrpc":"2.0","method":"streamNotify","params":{"streamId":"Debug","event":{"type":"Event","kind":"BreakpointAdded","isolate":{"type":"@Isolate","id":"isolates/478628281828835","name":"main","number":"478628281828835","isSystemIsolate":false,"isolateGroupId":"isolateGroups/9029525345721931127"},"timestamp":1687279515332,"breakpoint":{"type":"Breakpoint","fixedId":true,"id":"breakpoints/6","enabled":true,"breakpointNumber":6,"resolved":true,"location":{"type":"SourceLocation","script":{"type":"@Script","fixedId":true,"id":"libraries/@17238642/scripts/file%3A%2F%2F%2FC%3A%2FDev%2FTest%2520Projects%2Fflutter_counter%2Ftest%2Fwidget_test.dart/188d9b2237c","uri":"file:///C:/Dev/Test%20Projects/flutter_counter/test/widget_test.dart"},"tokenPos":663,"line":16,"column":18}}}}}
// Get the response from the request to add the breakpoint
<== [VM] {"jsonrpc":"2.0","result":{"type":"Breakpoint","fixedId":true,"id":"breakpoints/6","enabled":true,"breakpointNumber":6,"resolved":true,"location":{"type":"SourceLocation","script":{"type":"@Script","fixedId":true,"id":"libraries/@17238642/scripts/file%3A%2F%2F%2FC%3A%2FDev%2FTest%2520Projects%2Fflutter_counter%2Ftest%2Fwidget_test.dart/188d9b2237c","uri":"file:///C:/Dev/Test%20Projects/flutter_counter/test/widget_test.dart","_kind":"kernel"},"tokenPos":663,"line":16,"column":18}},"id":"917"}
It's only after we get the response from the request that we know the ID for this breakpoint, so when handling BreakpointAdded we fail to find the breakpoint so can't tell the client it's resolved.
We need to handle getting a BreakpointAdded event for a pending breakpoint request, and delay processing it until the request has completed. We already kinda do this with sending the response, but it currently relies the request completed first, that was only to ensure the correct ordering of the output.
Activity
incendial commentedon Jun 20, 2023
@DanTup hey, I was faster #4598 😁
incendial commentedon Jun 20, 2023
Ah, it's a different one? Looking into it.
DanTup commentedon Jun 20, 2023
@incendial I just replied there - this is just unverifying, but yours are disappearing too? :(
(I found this while trying to repro yours :) )
DanTup commentedon Jun 20, 2023
(and what's slightly confusing is that a verified breakpoint is visible behind the execution market, but an unverified breakpoint is not - so although it looks like the one on the yellow line disappears, it doesn't, it's still there and grey once I step away)
DanTup commentedon Jun 20, 2023
Logs for a breakpoint request that leaves things in this state..
We removed the old breakpoints from the VM, add the new ones (and get BreakpointAdded), but we then respond with unverified:false for everything, and never generate any DAP events to mark them as verified.
DanTup commentedon Jun 20, 2023
This seems to be a timing/ordering issue. The
BreakpointAddedevent comes before the response to add the breakpoint:It's only after we get the response from the request that we know the ID for this breakpoint, so when handling
BreakpointAddedwe fail to find the breakpoint so can't tell the client it's resolved.We need to handle getting a
BreakpointAddedevent for a pending breakpoint request, and delay processing it until the request has completed. We already kinda do this with sending the response, but it currently relies the request completed first, that was only to ensure the correct ordering of the output.[dds/dap] Ensure breakpoint modifications do not drop resolution events
DanTup commentedon Jun 22, 2023
Fixed by dart-lang/sdk@c2a4f8e