-
Notifications
You must be signed in to change notification settings - Fork 29.4k
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
Allow a stack frame with no source without saying "Unknown source" #20677
Comments
I agree that more of this should be moved to the debug adatper. |
I won't do anything with it in Feb |
Instead of changing what happens when there's a frame with no source, I think it would be better to introduce a 'presentationHint' like 'label', which @weinand proposed in the other issue. It does make sense to show "Unknown source" for a normal frame with no source - that might be an error. A label frame is a specific thing that will work differently than other frames. |
I agree that we should introduce a new Suggestion on how such a source should be shown are welcome here and in what way should it be specially treated. fyi @weinand |
You're assigning to me to first have the debug adapter return the new presentationHint? Sure, I can do that today. |
I'll add a 'frame' presentationHint to the DAP. |
@roblourens so if the stackFrame returns no source I will behave the same as before. |
I don't think that we should use the presentationHint on Source for this. It is more appropriate to have something like this on StackFrame. I'm investigating... |
@weinand from my implementation point of view - I always expect a Source to be non null, so even if you introduce the presentaion hint on the stackFrame I will create a dummy source object with that presentation hint |
@isidorn sure, you can create a dummy Source object as an implementation detail. But from the protocol perspective it sounds wrong to have the backend create dummy Source objects just to be able to specify the 'frame' presentationHint. |
I agree, I forgot that the presentationHint isn't actually on the frame. |
I've created this "protocol addition" request: microsoft/vscode-debugadapter-node#106 |
Great. |
@isidorn I've added an optional |
@roblourens you could use a heuristic in the DA to hide those "well known" frames (independent from skipFiles)? |
That's not a bad idea. I could show a frame that says '5 collapsed frames' in the deemphasized style (or even using 'label'). And there could be a context menu item to toggle it. It even might not be a bad thing to do for all skipFiles, especially when using async/await, because it generates a lot of garbage frames in user scripts. Collapse them by default, toggling works on the whole callstack and persists while stepping. Cool how much we can do with minimal added vscode UI. |
Yes, we should consider to have a generic "collapse/expand skipped frames" feature. |
@roblourens great that you were able to connect all the dots! Maybe you could post a short gif showing of this niceness in the ux channel once you have it polished. |
From #5552, looking at using stack frames with no source as a label for groups of async frames.
Currently when there's no source, they say "Unknown source" on the right. I think that either that label shouldn't be shown, or I should be able to mark a stack frame to have it not shown.
Also these frames are automatically 'deemphasized'. I'm not sure whether I would want that style. It needs to be obvious that these frames are async, and the point of deemphasize is to make a frame easy to ignore. I think that decision should be left up to the debug adapter.
The text was updated successfully, but these errors were encountered: