Skip to content

Test variable view for python REPL #24162

Closed
@amunger

Description

@amunger

Refs: #24066

Complexity: 2

Create Issue


Pre-requisites:

You must have python installed on your machine

Test steps

  1. ensure settings
"python.REPL.sendToNativeREPL": true
"notebook.experimental.variablesView": true,

and "jupyter.interactiveWindow.textEditor.executeSelection": false if jupyter is installed (default)

  1. open a python file and execute some code with shift enter (python.execInREPL) to create some variables. This should open the native REPL to the side.

e.g.

class A:
    prop1 = 1
    prop2 = 2

    def __init__(self, a, b):
        self.a = a
        self.b = b
        self.list = [1, 2, 3]

class B:
    propList = [A(100, 200), A(300, 400)]


aString = "Hello"
aList = [1, 2, aString]
aList.append(aList) # Circular reference
aTuple = (3, 4, aString)
aSet = {5, 6, aTuple, aString}
aDict = {7: 8, 9: aSet}
anInt = 10
aFloat = 11.2
anObject = A(12, 13)
nestedObject = B()

bigLongList = []
longList = []
string = 'ab' * 1000
for i in range(100000):
    bigLongList.append('string' + str(i) + string)
    longList.append(i)
  1. open the debug pane and explore the created variables in the "REPL variables" view
  2. also try executing code through the input box

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions