debug: initial support of breakpoint modes (#205251)

This supports breakpoint modes on exception, instruction, and source
breakpoints. It doesn't yet do data breakpoints since I was having
trouble figuring out a good user flow for that. You can test this on the
`connor4312/breakpoint-modes` branch of mock-debug, which I'll merge in
after the next DAP release.

![](https://memes.peet.io/img/24-02-68cd0222-8ef5-4d39-aa51-81ba5b8c2405.png)
This commit is contained in:
Connor Peet
2024-02-15 06:36:53 +01:00
committed by GitHub
parent e587755905
commit 3ce7ccff41
19 changed files with 734 additions and 284 deletions
@@ -217,14 +217,15 @@ export class MainThreadDebugService implements MainThreadDebugServiceShape, IDeb
column: l.character > 0 ? l.character + 1 : undefined, // a column value of 0 results in an omitted column attribute; see #46784
condition: l.condition,
hitCondition: l.hitCondition,
logMessage: l.logMessage
logMessage: l.logMessage,
mode: l.mode,
}
);
this.debugService.addBreakpoints(uri.revive(dto.uri), rawbps);
} else if (dto.type === 'function') {
this.debugService.addFunctionBreakpoint(dto.functionName, dto.id);
this.debugService.addFunctionBreakpoint(dto.functionName, dto.id, dto.mode);
} else if (dto.type === 'data') {
this.debugService.addDataBreakpoint(dto.label, dto.dataId, dto.canPersist, dto.accessTypes, dto.accessType);
this.debugService.addDataBreakpoint(dto.label, dto.dataId, dto.canPersist, dto.accessTypes, dto.accessType, dto.mode);
}
}
return Promise.resolve();