Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Execute Python code line by line, like VBA?

Tags:

python

ide

I'm new to python and I'm having fun. So far I've only been on the road in VBA and SQL, but one thing bothers me. Is there no feature that goes through the code line by line like in VBA? This has always helped me a lot with VBA (F8), I could check the value of the variable on the fly (hold mouseover), i could check the whole code better and see where exactly it is running on a bug. Is this function not really available in python? I use PyCharm as IDE

Thanks!

like image 722
Mr.Shazam Avatar asked Mar 04 '26 21:03

Mr.Shazam


1 Answers

You may try the following command: python -m pdb <script.py>. It will run the script in the Python debugger where you can traverse your code step by step.

like image 88
vpetrigo Avatar answered Mar 07 '26 09:03

vpetrigo



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!