Skip to content

Commit

Permalink
Fix breakpoint condition test when using SDK DAP
Browse files Browse the repository at this point in the history
SDK DAP uses pause-on-exit to handle draining async logging events.
  • Loading branch information
DanTup committed Mar 15, 2022
1 parent 2bfae9c commit a27401a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/test/dart_debug/debug/dart_cli.test.ts
Original file line number Diff line number Diff line change
@@ -717,8 +717,10 @@ void printSomething() {
let didStop = false;

dc.waitForEvent("stopped")
.then(() => didStop = true)
.catch(() => {
.then((e) => {
if (e.body?.reason === "breakpoint")
didStop = true;
}).catch(() => {
// Swallow errors, as we don't care if this times out, we're only using it
// to tell if we stopped by the time we hit the end of this test.
});

0 comments on commit a27401a

Please sign in to comment.