Skip to content

Commit 510cacb

Browse files
carllocostolauwae
authored andcommitted
fix #112: update state on debugger start
After connecting to the VM the plugin requests the initial runtimestate but did not update the bridge with that state. Consequently, the debugger faultly indicates the first line of any source file as the starting debugging location. This commit updates the state of the bridge on connection and highlights the line associated to the PC retrieved from the first state as starting debug location.
1 parent c9a5165 commit 510cacb

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

src/DebugSession/DebugSession.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,10 @@ export class WARDuinoDebugSession extends LoggingDebugSession {
183183

184184
await debugBridge.connect();
185185
if (deviceConfig.onStartConfig.pause) {
186-
await this.debugBridge?.refresh();
186+
const rs = await this.debugBridge?.refresh();
187+
if (rs) {
188+
this.debugBridge?.updateRuntimeState(rs);
189+
}
187190
}
188191

189192
if (this.startingBPs.length > 0) {

0 commit comments

Comments
 (0)