Home > OS >  VSCode: show entire variable in debug console
VSCode: show entire variable in debug console

Time:08-10

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?

CodePudding user response:

You should be able to click the > sign to the left of the variable result to expand it.

CodePudding user response:

for item in set(x):
    print(item)

CodePudding user response:

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

  • Related