Skip to content

Commit 91349d2

Browse files
authored
Adding a custom event to trigger re-rendering of breakpoints in source code (eclipse-cdt-cloud#153)
* added custom event handler function for handling breakpoint custom request toggling all breakpoints * update custom breakpoint event name * removing an extra line
1 parent 417ca00 commit 91349d2

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/extension.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
* SPDX-License-Identifier: EPL-2.0
99
*********************************************************************/
10-
import { ExtensionContext, commands, window } from 'vscode';
10+
import { ExtensionContext, commands, window, debug } from 'vscode';
1111
import { MemoryServer } from './memory/server/MemoryServer';
1212
export { MemoryServer } from './memory/server/MemoryServer';
1313
import { ResumeAllSession } from './ResumeAllSession';
@@ -23,6 +23,14 @@ export function activate(context: ExtensionContext) {
2323
new SuspendAllSession(context);
2424
new CustomReset(context);
2525

26+
debug.onDidReceiveDebugSessionCustomEvent(event => {
27+
if (event.event === "cdt-gdb-adapter/UpdateBreakpointView") {
28+
const bps = debug.breakpoints;
29+
debug.removeBreakpoints(bps);
30+
debug.addBreakpoints(bps);
31+
}
32+
});
33+
2634
context.subscriptions.push(
2735
commands.registerCommand('cdt.debug.askProgramPath', (_config) => {
2836
return window.showInputBox({

0 commit comments

Comments
 (0)