Skip to content

Defer initializeProfiling until after InitializedEvent#362

Merged
TwitchBronBron merged 2 commits into
masterfrom
fix/initialize-profiling-ordering
May 28, 2026
Merged

Defer initializeProfiling until after InitializedEvent#362
TwitchBronBron merged 2 commits into
masterfrom
fix/initialize-profiling-ordering

Conversation

@chrisdp
Copy link
Copy Markdown
Collaborator

@chrisdp chrisdp commented May 28, 2026

Summary

PR #328 moved initializeProfiling() ahead of sendResponse(response). That caused ProfilingEnabledEvent to reach the extension before VS Code fired onDidStartDebugSession. The extension's session-start handler then cleared brightscript.tracingEnabled, hiding the profiling toolbar buttons for the rest of the session.

Move the call to the end of launchRequest (after InitializedEvent) so the session-start cleanup runs first and the enable event sticks.

chrisdp added 2 commits May 28, 2026 14:15
PR #328 moved `initializeProfiling()` ahead of `sendResponse(response)`, which
caused `ProfilingEnabledEvent` to be delivered to the extension before VS Code
fired `onDidStartDebugSession`. The extension's session-start handler then
cleared `brightscript.tracingEnabled`, hiding the profiling toolbar buttons.

Move the call to the end of `launchRequest` (after `InitializedEvent`) so the
session-start cleanup runs first and the enable event takes effect.
@TwitchBronBron TwitchBronBron enabled auto-merge (squash) May 28, 2026 17:20
@TwitchBronBron TwitchBronBron merged commit 449b570 into master May 28, 2026
10 checks passed
@TwitchBronBron TwitchBronBron deleted the fix/initialize-profiling-ordering branch May 28, 2026 17:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants