Skip to content

Displaying the type (class) of variables in the "Variables" panel during debugging, as implemented in PyCharm #931

Closed

Description

@dbulgakov7

Is it possible for Python to display variable type (class) in the "Run and Debug" -> "Variables" panel?
For simple types, it is not difficult to understand the type (class) of a variable, but for complex types it can be a problem. Moreover, in VS Code, information about a variable type does not always display information in Special Variables -> class

I attach screenshots of how the information about variables in PyCharm and VS Code looks like. What I want to see in the PyCharm screenshot is underlined with red lines.

PyCharm 2022.1 (Community Edition)

165974624-1543f339-3868-4fca-92ab-faddce155acf

Visual Studio Code 1.67.1 + Python Extension v2022.6.1

165974677-cb911b1e-e2ce-4005-835e-3b88928c811d

Activity

  1. int19h commented on May 25, 2022

    @int19h
    Contributor

    This is a VSCode limitation, so far as I know. debugpy itself reports the type of all variables and expressions, and it's up to the client to display it. VSCode shows a tooltip on hover for that, instead of a separate column in the list.

  2. int19h commented on May 25, 2022

    @int19h
    Contributor
  3. dbulgakov7 commented on May 26, 2022

    @dbulgakov7
    Author

    This is a VSCode limitation, so far as I know. debugpy itself reports the type of all variables and expressions, and it's up to the client to display it. VSCode shows a tooltip on hover for that, instead of a separate column in the list.

    Yes, I see it now. Thanks!

    type_of_variable

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions