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

Could we provide more details of the variable when debug like the PyCharm does? #146748

Open
gonghenghai opened this issue Jan 14, 2022 · 20 comments
Assignees
Labels
debug Debug viewlet, configurations, breakpoints, adapter issues feature-request Request for new features or functionality
Milestone

Comments

@gonghenghai
Copy link

InkedCapture_LI
InkedCapture2_LI

I know, we can get more details through clicking the arrow to get into the variable or through some expression in the WATCH panel. But it will be better to act as the PyCharm does.

@gonghenghai gonghenghai added the feature-request Request for new features or functionality label Jan 14, 2022
@karthiknadig
Copy link
Member

Related microsoft/vscode-python-debugger#167, this is for the content shown in the code itself.

For the additional information in the variable view it should come from the debugger.
/cc @fabioz, @int19h

@karthiknadig
Copy link
Member

Thanks for the feature request! We are going to give the community 60 days from when this issue was created to provide 7 👍 upvotes on the opening comment to gauge general interest in this idea. If there's enough upvotes then we will consider this feature request in our future planning. If there's unfortunately not enough upvotes then we will close this issue.

@rgimenes26
Copy link

InkedCapture_LI InkedCapture2_LI

I know, we can get more details through clicking the arrow to get into the variable or through some expression in the WATCH panel. But it will be better to act as the PyCharm does.

I agree that there is a lot to improve there. Not only showing the variables views when debugging but when running a python integrated terminal too. Like when we run a Jupyter Notebook. Not only PyCharm but R Studio's Python development do this very wheel. Not only displaying the variables but also when working with Pandas DataFrames (Sorting, Filtering, Page.ing )

@ghuname
Copy link

ghuname commented Feb 10, 2022

In pycharm even position of the debug window is better. It is on the bottom with more width. In vscode we are stuck, can't move it anywhere.

For example compare these two pictures:

image

and

image

What do you think which is better?
Furthermore, how to remove function variables, class variables, Optional, jwt, status from vscode?
Pycharm is not showing them and I have never missed them.

In vscode, there is also a problem with showing dataframes.
You can open it in window that you cannot maximize iz order to take the full screen which is very convenient when you have a lot of rows/columns which is normal in data science world.

@BlueGlassBlock
Copy link

BlueGlassBlock commented Feb 14, 2022

It would be nice if sections like class variables and function variables can be removed.

Instead, place dynamically created functions and classes in the data frame please.

Because sometimes I really need to inspect lots of dynamic functions and classes.

@fabioz
Copy link
Contributor

fabioz commented Feb 14, 2022

It would be nice if sections like class variables and function variables can be removed.

@BlueGlassBlock as a note, this is already configurable in your launch.json (see: microsoft/debugpy#481)

@fabioz
Copy link
Contributor

fabioz commented Feb 14, 2022

In pycharm even position of the debug window is better. It is on the bottom with more width. In vscode we are stuck, can't move it anywhere.

@ghuname that's not entirely true, you can drag your variables elsewhere:

image

@ghuname
Copy link

ghuname commented Feb 14, 2022

@fabioz I didn't know that. You are right. It is much better if variables are near terminal region. Sorry for wrong statement.

@ghuname
Copy link

ghuname commented Feb 14, 2022

It would be nice if sections like class variables and function variables can be removed.

@BlueGlassBlock as a note, this is already configurable in your launch.json (see: microsoft/debugpy#481)

@fabioz How do you comment this picture?

image

@rgimenes26
Copy link

rgimenes26 commented Feb 14, 2022

RStudio python IDLE dataframe viewer. Just type:
view(df) in the terminal

image

Actually any variable you can click in the table if you think it's usefull.
image

It you open in a new tab. Like this function "f".
image

I prefer the vscode tree like view, like a dictionary, because its better organized, but the dataframe viewer its very good.
And remember this is all working without the debug mode. just the python terminal, this is the real improvement to do in vscode.

This and run code in multiples python iterative terminals like in microsoft/vscode-python#18315 .

@BlueGlassBlock
Copy link

It would be nice if sections like class variables and function variables can be removed.

@BlueGlassBlock as a note, this is already configurable in your launch.json (see: microsoft/debugpy#481)

That worked for me as I configured it to inline, thanks! It's not presented in the auto suggestion so I missed it.

Well, I actually want the ability to search through the data frame, or something like MyVarsOnly button to display vars, functions and classes only from "my code".

@ghuname
Copy link

ghuname commented Feb 15, 2022

It would be nice if sections like class variables and function variables can be removed.

@BlueGlassBlock as a note, this is already configurable in your launch.json (see: microsoft/debugpy#481)

That worked for me as I configured it to inline, thanks! It's not presented in the auto suggestion so I missed it.

@BlueGlassBlock can you please provide the launch.json with "inline" that prevents showing class and function variables.
At least we should be able to have kind of toggle for that.

@BlueGlassBlock
Copy link

It would be nice if sections like class variables and function variables can be removed.

@BlueGlassBlock as a note, this is already configurable in your launch.json (see: microsoft/debugpy#481)

That worked for me as I configured it to inline, thanks! It's not presented in the auto suggestion so I missed it.

@BlueGlassBlock can you please provide the launch.json with "inline" that prevents showing class and function variables. At least we should be able to have kind of toggle for that.

Well, what I want to do is show all the class and function variables, not hiding them. Because I mainly use it when I need to tweak dynamically created classes and functions, etc. And inline did that pretty well.

@brettcannon
Copy link
Member

Thank you to everyone who upvoted this issue! Since the community showed interest in this feature request we will leave this issue open as something to consider implementing at some point in the future.

We do encourage people to continue 👍 the first/opening comment as it helps us prioritize our work based on what the community seems to want the most.

@int19h
Copy link

int19h commented Apr 1, 2022

The extra information that PyCharm shows is the type of the variable. This is something that debugpy already provides, but VSCode doesn't display in the variable list (while VS does, for example). You can see it if you hover over the variable in the list.

So I think this is really a VSCode enhancement to add a setting to display the type in the Variables pane?

@ghuname
Copy link

ghuname commented Apr 2, 2022

Yes that could be one enhancement, but pycharm shows variables in more pleasant format.
Furthermore, last set variable has different color in pycharm, so you can spot it easily.
I believe that we are here talking about many things that pycharm debug windows presents better.
Try to open complex object in vs code and in pycharm and everything will be clear to you.

@karthiknadig karthiknadig removed the feature-request Request for new features or functionality label Apr 4, 2022
@karthiknadig karthiknadig transferred this issue from microsoft/vscode-python Apr 4, 2022
@weinand weinand added debug Debug viewlet, configurations, breakpoints, adapter issues feature-request Request for new features or functionality labels Apr 4, 2022
@Ashark
Copy link

Ashark commented Jul 10, 2022

In pycharm even position of the debug window is better. It is on the bottom with more width. In vscode we are stuck, can't move it anywhere.

@ghuname that's not entirely true, you can drag your variables elsewhere:

image

Advise fot those who use wayland: such drag does not work currently. To drag that panel I restarted vscodium without --enable-features=UseOzonePlatform --ozone-platform=wayland , and then I could drag that.

@weinand
Copy link
Contributor

weinand commented Oct 19, 2022

Suggestion form @int19h:
VS Code setting to display the type in the Variables pane

@lyjdwh
Copy link

lyjdwh commented Dec 7, 2022

Is there a way to customize the order of variables? If so we can put the shape and type on the top of the list!

@PengjuYan
Copy link

Any progress on this issue? When I talked about this problem, people around me say "vscode is great, and PyCharm is much better". LOL

Really looking forward to solve it before people turn away.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
debug Debug viewlet, configurations, breakpoints, adapter issues feature-request Request for new features or functionality
Projects
None yet
Development

No branches or pull requests

14 participants