user10561801
user10561801

Reputation:

to print the variable values in python in debug mode ( pycharm is the IDE)

I want to print the value of variable on the pycharm console while in the debug mode in python. How can i achieve this?

Upvotes: 0

Views: 3159

Answers (1)

Josh Friedlander
Josh Friedlander

Reputation: 11657

Debug mode in PyCharm has two sections, debugger and console:

enter image description here

Debug shows you the variables in memory, and console shows the output of your code. Additionally, if you're at a breakpoint you can print variables out or interact with them in the debug console. Click on the second-last icon here
enter image description here
while in debug mode. (If you don't see it, try enlarging the bottom debugging area upwards.)

If you still can't find it, look for a console icon on the top right - sometimes the console gets hidden for some reason.

Upvotes: 2

Related Questions