Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ending the active session gives undefined activeStackItem even if there is another session #213646

Closed
sandy081 opened this issue May 28, 2024 · 1 comment
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug debug Debug viewlet, configurations, breakpoints, adapter issues

Comments

@sandy081
Copy link
Member

Testing #213603

Here is the extension code listening to activeStackItem

context.subscriptions.push(
        vscode.debug.onDidChangeActiveStackItem(session => {
            console.log('Active debug stack item changed: ', vscode.debug.activeStackItem);
        })
    );

Steps

  • Open a workspace with two python files
  • Install Python Extension
  • Open file 1 with content print ('Hello File 1'). Keep a break point on this line and start debugging this file. As expected break point hits and the debugging extension logs this stackItem.
  • Open file 2 with content print ('Hello File 2'). Keep a break point on this line and start debugging this file. As expected break point hits and the debugging extension logs this stackItem.
  • Resume the second session to continue.

🐛 Extension logs undefined first for activeStackItem and after it logs the stack item of first session

@connor4312 connor4312 added bug Issue identified by VS Code Team member as probable bug debug Debug viewlet, configurations, breakpoints, adapter issues labels May 28, 2024
@connor4312
Copy link
Member

Thanks for the bug. This actually represents the view state accurately at the moment: we focus the session, not a thread, and this is not represented in the API. I'll see if consumers run into a case where they need this info, but unless I hear something from consumers I plan to leave as-is.

@microsoft microsoft locked and limited conversation to collaborators Jul 14, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug debug Debug viewlet, configurations, breakpoints, adapter issues
Projects
None yet
Development

No branches or pull requests

2 participants