skip to Main Content

when debugging python code in VSCode, how do i show the entire variable. As you can see from the image below, i am printing out the variable ‘x’..but not all of it’s values shows in the debugging console. it is cut off and followed by an elipse indicating there is more:

enter image description here

While I know I can use the ‘>’ to show a list of each item in the set in this case, is there a way to print the entire variable as a string in the debug pane/console – much like we would be able to if we were using the command line for our venv?

3

Answers


  1. for item in set(x):
        print(item)
    
    Login or Signup to reply.
  2. You should be able to click the > sign to the left of the variable result to expand it.

    Login or Signup to reply.
  3. I made a simple replay. You can find the variable on the left side after using debug:

    enter image description here

    You can copy it like the following picture:

    enter image description here

    you can paste the copied content:
    enter image description here

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search