简体   繁体   中英

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?

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

在此处输入图片说明

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
在此处输入图片说明
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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM