-
Notifications
You must be signed in to change notification settings - Fork 29.5k
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
Unclutter CALL STACK view by eliminating parent debug session #99736
Comments
Love this suggestion, and I think we should really look into this to reduce the clutter and thus make debugging seem less complex. Using the tree compressed feature might just work, however what would be the title in the example above. I think it should just be What do you think? |
Using the debug context is more work, but I think it's also the best way to solve this. For js-debug, we don't really care about the top level container being a "session", we just need 'something' to put our sessions in. If there was the concept of contexts, that would also be a more generalized solution to the However a compressed tree would be much less complex on the vscode and api side. 👍 on trying that first and seeing where that gets us. |
Ok, so let's start with compact tree. Thus assigning to me, and once we have that we can figure out what to do next. |
I have pushed a first iteration of this, now we use a compressed tree in the call stack view. Please note the following:
Potential follow up work:
Here's the current state of thigns. Try it out and let me know what you think |
fyi @luabud do you know when Python uses child debug sessions? And if this behavior of compressing single child sessions makes sense for Python? |
@int19h thanks a lot for jumping into the discussion.
Yes, you understood correctly the child session would drive the UX. I have just changed the label computation to only use the parent label. I think that would also work for js-debug. And yes this changes are only about the visual representation of the same object model. Nothing actually changed underneath. Also the So the only remaining issue is that the Compact object would show the disconnect, not the stop. I suggest we tackle this as a seperate issue. For now closing this as we have done what we planned. For further improvements I suggest we open new issues. @weinand are you aware of other debug extensions that might use the parent debug sessions? |
We can have a "heuristic": never show disconnect on child sessions, always show stop. Let me know if you think this makes sense in general. Since I believe there were other cases where disconnect is unexpected. |
@isidorn if we cannot find a good heuristic to make this "parent compression" work for all extensions, we could provide API to allow extensions to opt into this feature. E.g. a new option on the |
@int19h thanks for trying it out with VS Code insiders. As for your other concern that the Call Stack shows only Disconnect and not Stop. That seems to be the same concern that we should show Stop instead. So my question is: when there is only one child session what is the difference in behavior if the user clicks on the disconnect on the child session vs clicking stop on the parent sessions? Do users differentiate this? @weinand thanks for suggestion. We can go down that path if we can not find something which works for everyone. |
If they click "Disconnect" on the child session, that's exactly what's going to happen - they'll just disconnect from that session, but the corresponding process is still running; and they're still connected to the parent session. They'll have to stop that parent session next to fully stop debuggee. Which is very confusing in a launch scenario. But there's also an attach scenario here, where they start the same app by other means. In that case, they'll still have two sessions, but both would be expected to have "Disconnect", and disconnecting from both is expected to keep the debuggee running. So, the expectation here is that when the child session is collapsed into the parent, the resulting aggregate would behave in the same way as the parent session, because the parent session is where launch/attach is differentiated. If parent was "launch", then users expect to see Stop; if "attach", Disconnect. In any scenario I can think of where collapse would be triggered (i.e. 1 parent + 1 child), the users don't actually care about the child session from the perspective of Stop/Disconnect. To be honest, they don't really care about it at all - the fact that there are two processes there is really just an implementation detail of the web framework. It just so happens that one of those processes runs user code, and the other one is responsible for the app lifecycle. BTW, one thing that's not clear to me - what happens to Pause when sessions get collapsed? Does it pause all of them? |
@int19h Ok, so it seems like we are on the same page. We could make this less complex to the users if we do it right. Do you have some users who are using vscode insiders and could provide feedback on this right now? Bottom line: if pythong would like to opt out of this behavior we can provide some capability. But I think we should first try to make the current approach work. |
…ent stop would effect all elements fixes #99736
@int19h I have pushed a change what I already mentioned that the fyi @connor4312 I have also created this test plan item so we cover this #100850 After discussing with @weinand we decided to be on the safe side and add an option to Extension to opt out of this behavior #100852 |
@connor4312 I can change our approach that we only compress two sessions, never 3. However that might be a bit hackish. Can you elaborate a bit why this is undesirable. |
@connor4312 nicer solution: we are introducing a |
noCompact/incompressible works. Special casing the second-level to not be compressed feels a bit too specific to js-debug for vscode to do in general; a flag there instead would be perfect. |
@connor4312 awesome, then just try it out and while you are at it you can test this item :) |
I have removed the "hack" that we treat the stoped / disconnect action special in the compressed element. |
@isidorn Is there an issue to track that, or would you like me to file one? |
@int19h yes please do that, so we can consolidate with @connor4312 on the best approach to take here. |
When debugging simple "one process" JS programs, there is always a top level debug session that clutters the CALL STACK view:
We should try to get rid of this either:
In the general case (with multiple debug sessions) it is still needed to have a parent, but we should better indicate the purpose of the parent. Today (as seen in the screenshot) we show the parent as a regular debug session and duplicate the stopped reason ("Paused on Breakpoint"). This is really confusing. As a first step we should remove the reason and show a different icon or no better no icon (and probably offer different context menu actions).
@connor4312 @isidorn what's your opinion?
The text was updated successfully, but these errors were encountered: