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

Too much variable in the python console of VSCODE #258

Closed
ayeteng opened this issue May 20, 2020 · 8 comments
Closed

Too much variable in the python console of VSCODE #258

ayeteng opened this issue May 20, 2020 · 8 comments

Comments

@ayeteng
Copy link

ayeteng commented May 20, 2020

Bug: Notebook Editor, Interactive Window, Editor cells

Steps to cause the bug to occur

  1. The python debug console become very complicated with a lot of special variables. (special variable & much more.) How can I hide the unnecessary variable like before? If possible to have a setting parameter in setup.

Actual behavior

New version both 2020.5.80290 & 2020.5.78807
bad_python

Expected behavior

Old version 2020.4.76186
old2

Your Jupyter and/or Python environment

Please provide as much info as you readily know

  • Jupyter server running: Local
  • Extension version: 2020.5.80290
  • VS Code version: 1.45.1
  • Setting python.jediEnabled: true | false
  • Python and/or Anaconda version: 3.7.7
  • OS: Mac
  • Virtual environment: virtualenv

Developer Tools Console Output

Microsoft Data Science for VS Code Engineering Team: @rchiodo, @IanMatthewHuff, @DavidKutu, @DonJayamanne, @greazer

@karthiknadig karthiknadig transferred this issue from microsoft/vscode-python May 20, 2020
@fabioz
Copy link
Collaborator

fabioz commented May 20, 2020

There's a setting for this:

variablePresentation

If you pass:

variablePresentation={
    "all": "hide",
    "protected": "inline",
}

in the launch configuration, it should behave the same way it did previously.

The keys accepted are: special, function, class, protected and all (all sets the default for all the groups available). The valid values are: group, inline, hide, so, you should be able to customize as you'd like (I believe there are plans to set the default in the editor settings and automatically pass it in the launch, but I don't know if VSCode Python caught up with that already).

p.s.: this was actually done due to the following requests (microsoft/ptvsd#763, microsoft/ptvsd#1621).

@karthiknadig I don't think there's anything to do in the backend in this case, still, I'm leaving it open for you to decide whether something should still be done in the client/docs.

@karthiknadig
Copy link
Member

karthiknadig commented May 20, 2020

/cc @rchiodo Let me know of we should transfer this back to extension. Or do we need any additional features here.

@karthiknadig
Copy link
Member

/cc @greazer

@int19h
Copy link
Contributor

int19h commented Jun 16, 2020

@int19h int19h closed this as completed Jun 16, 2020
@JeremyDalby
Copy link

The variablePresentation setting only seems to hide some of the special variables and function variables. Is there any way to hide all of them?

image

@int19h
Copy link
Contributor

int19h commented Jun 20, 2022

If you expand those groups, what are the variables under them? Or does it just show the empty group?

@JeremyDalby
Copy link

Inside "special variables", it show the special variables of the object's class, and inside "function variables", it shows the object's class methods. In some cases they seems to be infinitely expandable.

image

image

@fabioz
Copy link
Collaborator

fabioz commented Jun 23, 2022

@JeremyDalby

The problem in the example is that:

      "variablePresentation": {
        "all": "hide",
        "protected": "inline"
      }

needs to be added inside the Hockey Team Script python launch (the example shows it added as a separate item which is not supported).

Maybe the idea was using it as a template? (if that's the case, this is already reported at: microsoft/vscode-python-debugger#165).

Note that variablePresentation will appear underlined with yellow because it's not declared in package.json in vscode-python (but debugpy should understand it anyways).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants