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

Debug: Clicking a callstack row calls openEditor twice #136829

Closed
bpasero opened this issue Nov 10, 2021 · 1 comment
Closed

Debug: Clicking a callstack row calls openEditor twice #136829

bpasero opened this issue Nov 10, 2021 · 1 comment
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug debug Debug viewlet, configurations, breakpoints, adapter issues insiders-released Patch has been released in VS Code Insiders verified Verification succeeded
Milestone

Comments

@bpasero
Copy link
Member

bpasero commented Nov 10, 2021

Add a console.log(new Error().stack) into

openInEditor(editorService: IEditorService, selection: IRange, preserveFocus?: boolean, sideBySide?: boolean, pinned?: boolean): Promise<IEditorPane | undefined> {

Follow steps from #136684 (comment). Notice how openEditor is called 2 times:

debugSource.js:53 Error
    at Source.openInEditor (debugSource.js:53)
    at StackFrame.openInEditor (debugModel.js:322)
    at DebugService.focusStackFrame (debugService.js:691)
    at focusStackFrame (callStackView.js:214)
    at callStackView.js:222
    at Emitter.fire (event.js:435)
    at TreeResourceNavigator._open (listService.js:494)
    at TreeResourceNavigator.onPointer (listService.js:472)
    at listService.js:438
    at Emitter.fire (event.js:435)
    at event.js:43
    at Emitter.fire (event.js:435)
    at event.js:43
    at Emitter.fire (event.js:435)
    at TreeNodeListMouseController.onViewPointer (listWidget.js:535)
    at TreeNodeListMouseController.onViewPointer (abstractTree.js:852)
    at event.js:65
    at Emitter.fire (event.js:435)
    at event.js:43
    at Emitter.fire (event.js:435)
    at HTMLDivElement.fn (event.js:11)
debugSource.js:53 Error
    at Source.openInEditor (debugSource.js:53)
    at StackFrame.openInEditor (debugModel.js:322)
    at callStackView.js:223
    at Emitter.fire (event.js:435)
    at TreeResourceNavigator._open (listService.js:494)
    at TreeResourceNavigator.onPointer (listService.js:472)
    at listService.js:438
    at Emitter.fire (event.js:435)
    at event.js:43
    at Emitter.fire (event.js:435)
    at event.js:43
    at Emitter.fire (event.js:435)
    at TreeNodeListMouseController.onViewPointer (listWidget.js:535)
    at TreeNodeListMouseController.onViewPointer (abstractTree.js:852)
    at event.js:65
    at Emitter.fire (event.js:435)
    at event.js:43
    at Emitter.fire (event.js:435)
    at HTMLDivElement.fn (event.js:11)
@bpasero bpasero added bug Issue identified by VS Code Team member as probable bug list-widget List widget issues labels Nov 10, 2021
@joaomoreno joaomoreno added this to the November 2021 milestone Nov 10, 2021
@joaomoreno joaomoreno removed their assignment Jan 26, 2022
@joaomoreno joaomoreno removed the list-widget List widget issues label Jan 26, 2022
@joaomoreno joaomoreno removed this from the January 2022 milestone Jan 26, 2022
@joaomoreno joaomoreno added the debug Debug viewlet, configurations, breakpoints, adapter issues label Jan 26, 2022
@joaomoreno
Copy link
Member

Sorry for the delay here. The problem isn't in the list widget but in the call stack view, which does two things simultaneously to open the file:

focusStackFrame(element, element.thread, element.thread.session);
element.openInEditor(this.editorService, e.editorOptions.preserveFocus, e.sideBySide, e.editorOptions.pinned);

@roblourens Am I right in assigning this to you now?

@joaomoreno joaomoreno changed the title Clicking into list results in 2 openEditor calls Debug: Clicking a callstack row calls openEditor twice Jan 26, 2022
@roblourens roblourens added this to the February 2022 milestone Jan 27, 2022
@roblourens roblourens modified the milestones: February 2022, March 2022 Feb 24, 2022
@roblourens roblourens modified the milestones: March 2022, April 2022 Mar 23, 2022
@bpasero bpasero added the verified Verification succeeded label Apr 26, 2022
@github-actions github-actions bot locked and limited conversation to collaborators May 28, 2022
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 insiders-released Patch has been released in VS Code Insiders verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

4 participants
@joaomoreno @roblourens @bpasero and others