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

Broken Debug Console #108202

Closed
roblourens opened this issue Oct 6, 2020 · 9 comments
Closed

Broken Debug Console #108202

roblourens opened this issue Oct 6, 2020 · 9 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug candidate Issue identified as probable candidate for fixing in the next release debug Debug viewlet, configurations, breakpoints, adapter issues verified Verification succeeded

Comments

@roblourens
Copy link
Member

roblourens commented Oct 6, 2020

  • Reload the window, ensure debug console is never opened
  • Start debugging a launch config with "internalConsoleOptions": "neverOpen" or a launch config that fails to start/attach so that the debug console is never opened
    • I first hit this with a launch config that started normally, but I don't know how that's possible
  • Start a second launch config that also never causes the debug console to open
  • Open the debug console
  • It's empty

Get a notification for this error

image

Hit the error in the debugger:

getActionViewItem (repl.ts:462)
actionViewItemProvider (viewPaneContainer.ts:299)
actionViewItemProvider (toolbar.ts:87)
(anonymous) (actionbar.ts:276)
push (actionbar.ts:261)
(anonymous) (toolbar.ts:167)
setActions (toolbar.ts:166)
setActions (viewPaneContainer.ts:483)
renderHeader (viewPaneContainer.ts:306)
render (paneview.ts:213)
render (viewPaneContainer.ts:271)
onDidAddViewDescriptors (viewPaneContainer.ts:1362)
create (viewPaneContainer.ts:1069)
create (panecomposite.ts:44)
showComposite (compositePart.ts:219)
doOpenComposite (compositePart.ts:150)
openComposite (compositePart.ts:114)
doOpenPanel (panelPart.ts:493)
openPanel (panelPart.ts:498)
run (panelActions.ts:189)
runAction (actions.ts:202)
run (actions.ts:194)
onClick (actionViewItems.ts:163)
(anonymous) (actionViewItems.ts:143)
processImmediate (internal/timers.js:439)

Seems that if the "select repl" action is valid at the time the viewPaneContainer is being created for the debug console, then it will invoke the actionViewItemProvider which assumes the tree has been instantiated already, but it hasn't yet, and it throws.

@roblourens
Copy link
Member Author

From b8e87aa

@roblourens
Copy link
Member Author

Actually it is easy to repro with the "VS Code" launch config. I guess I'm not sure what determines whether the debug console is shown or not when debugging starts because it is not shown for those configs.

@roblourens roblourens added bug Issue identified by VS Code Team member as probable bug debug Debug viewlet, configurations, breakpoints, adapter issues labels Oct 6, 2020
@roblourens roblourens added this to the September 2020 milestone Oct 6, 2020
@roblourens roblourens added the candidate Issue identified as probable candidate for fixing in the next release label Oct 6, 2020
@roblourens
Copy link
Member Author

But I don't understand why the debug console is not opened for me when I start this config.

  • Turn on "Smart" auto attach
  • Run "Launch VS Code"
  • I see it attach to some session that ends before it attaches to "Launch VS Code"
  • Debug console does not open

  • Disable auto attach
  • Run "Launch VS Code"
  • Debug console does open

And when the debug console does not open early and get a chance to initialize itself, that's when this bug is triggered.

@roblourens
Copy link
Member Author

roblourens commented Oct 6, 2020

It looks like @isidorn is out, so going ahead with a fix.

Decided to just revert the fix for #107860

I think the right fix would be to figure out what the current session is without looking at the tree, which I think is possible but I'll leave that for @isidorn. Or, create the tree earlier.

Then broke out the question of why the debug console doesn't appear when maybe it should, which makes this much easier to repro, into a separate issue.

@roblourens
Copy link
Member Author

Simplest repro steps

  • Reload window, don't open debug console
  • Set Auto attach -> Smart
  • Run the "VS Code" launch config
  • Try to open the debug console

@connor4312
Copy link
Member

connor4312 commented Oct 7, 2020

@JacksonKearl did you verify when you approved? If not I can verify this issue

@roblourens
Copy link
Member Author

It will need to be verified but the build is not released yet

roblourens added a commit that referenced this issue Oct 7, 2020
Revert "fixes #107860"

This reverts commit b8e87aa.
@roblourens
Copy link
Member Author

Now it is

@connor4312 connor4312 added the verified Verification succeeded label Oct 7, 2020
@isidorn
Copy link
Contributor

isidorn commented Oct 19, 2020

@roblourens thanks for jumping on this and for finding the root cause.

@github-actions github-actions bot locked and limited conversation to collaborators Dec 4, 2020
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 candidate Issue identified as probable candidate for fixing in the next release debug Debug viewlet, configurations, breakpoints, adapter issues verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

3 participants