vscode icon indicating copy to clipboard operation
vscode copied to clipboard

Use an expand/collapse control to control wrapping of long values in locals and watch window

Open stevencl opened this issue 10 years ago • 4 comments

Whenever there is a value that cannot be displayed in the amount of real estate available we should use an expando control to allow the user to expand/collapse the value so that they can see the whole value. This is especially useful in the case of displaying long strings.

For example, the screenshot below shows the selectedText and this variables with an expando. locals Then, when the variable is expanded, we show this: localsexpanded

stevencl avatar Dec 09 '15 10:12 stevencl

Nice idea - however not sure if possible with our tree which we use for showing variables.

I would not introduce this concept until users start asking for this since we currently support word wrap in repl thus there is a nice alternative to inspect long strings there. Also we have context menu actions which provide some functionality for inspecting long values.

isidorn avatar Dec 09 '15 14:12 isidorn

Not sure I agree. We don't want the repl to be seen as a Band-Aid for functionality that is lacking elsewhere. The context menu actions aren't sufficient either. Copying the value so that it can be pasted somewhere else doesn't help when I need to inspect the same value over and over again (perhaps because I am updating the variable in a loop or whatever).

I think this is an example of some small change we can make to the UI (I realise that this is a bigger change on the backend since you need to eval the variable to show the full value in the locals window) that will significantly improve the experience of debugging code.

It is also an experience that may not be terribly common. For example, Visual Studio doesn't offer this and I believe it also suffers as a result. VS supports different visualisers but these result in a modal dialog that shows the whole value, I do not believe that this is ideal either.

This could be a small thing we do in the UI that ends up differentiating the VS Code debugger from other industry standard visual debuggers.

stevencl avatar Dec 09 '15 14:12 stevencl

Was this fixed?

stevencl avatar Nov 10 '17 11:11 stevencl

@stevencl no. I assume @weinand closed this issue because this feature request did not generate enough user trackation and we did not get any similar feature requests from users in this area. But @weinand can elaborate more.

isidorn avatar Nov 10 '17 16:11 isidorn