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

Test variable view for python REPL #24162

Closed
3 tasks done
amunger opened this issue Sep 23, 2024 · 4 comments
Closed
3 tasks done

Test variable view for python REPL #24162

amunger opened this issue Sep 23, 2024 · 4 comments

Comments

@amunger
Copy link

amunger commented Sep 23, 2024

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
@amunger amunger added feature-request Request for new features or functionality testplan-item and removed feature-request Request for new features or functionality labels Sep 23, 2024
@ulugbekna
Copy link

ulugbekna commented Sep 24, 2024

oh, i love how the repl looks! This has progressed so much! I remember when we were working on a send-to-REPL for the ocaml extension a couple of years ago, we looked at how python ext does it, and it used to just send the repl command to terminal and wait a couple of sec hoping it gets launched by then :D

Now the experience is very slick

@joshspicer
Copy link
Member

joshspicer commented Sep 24, 2024

Very slick I've never used the repl before and I like it!

Perhaps a silly question, where is the debug pane? I've enabled the variableViews settings but I can't see where I should be looking?

Image

@amunger
Copy link
Author

amunger commented Sep 24, 2024

side panel:
image

@joshspicer
Copy link
Member

Ah, I hadn't seen it at the bottom - thanks

@joshspicer joshspicer removed their assignment Sep 24, 2024
@lramos15 lramos15 added this to the September 2024 milestone Sep 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants