Skip to content

Commit

Permalink
Fixed a bug that would cause the stopOnEntry setting from always bein…
Browse files Browse the repository at this point in the history
…g respected when using restart debug session (#223)
  • Loading branch information
TwitchBronBron authored Feb 13, 2025
2 parents 8d6030f + 88a2e28 commit ec4ff92
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/debugSession/BrightScriptDebugSession.ts
Original file line number Diff line number Diff line change
Expand Up @@ -367,6 +367,11 @@ export class BrightScriptDebugSession extends BaseDebugSession {
public async launchRequest(response: DebugProtocol.LaunchResponse, config: LaunchConfiguration) {
const logEnd = this.logger.timeStart('log', '[launchRequest] launch');

// launchRequest gets invoked by our restart session flow.
// We need to clear/reset some state to avoid issues.
this.entryBreakpointWasHandled = false;
this.breakpointManager.clearBreakpointLastState();

//send the response right away so the UI immediately shows the debugger toolbar
this.sendResponse(response);

Expand Down Expand Up @@ -474,9 +479,6 @@ export class BrightScriptDebugSession extends BaseDebugSession {
// close disconnect if required when the app is exited
// eslint-disable-next-line @typescript-eslint/no-misused-promises
this.rokuAdapter.on('app-exit', async () => {
this.entryBreakpointWasHandled = false;
this.breakpointManager.clearBreakpointLastState();

if (this.launchConfiguration.stopDebuggerOnAppExit) {
let message = `App exit event detected and launchConfiguration.stopDebuggerOnAppExit is true`;
message += ' - shutting down debug session';
Expand Down

0 comments on commit ec4ff92

Please sign in to comment.