Home > Net >  Does Python have a values registry?
Does Python have a values registry?

Time:12-18

Im coming from a MatLab background, and started to pick up Python. In matlab it generates a table of the last value of any parameter while excecuting the code. It really helps in debugging.

is there anything simillar in Python, or is ironning the bugs out, soley based on print('...') to see the values of interest?

CodePudding user response:

Well you can use a proper debugger in python. In Pycharm it's the little bug to the right of the run button.

left: run right: debugger

You can then use break points to stop the code at any time. This is done by clicking to the right of the line number.

a break point

If your program hits that break point the program will pause.

hit break point

if your program is in a paused state you can navigate trough your code with these buttons

debugger buttons

CodePudding user response:

Some IDLEs, for example, PyCharm, provide the ability to debug. enter image description here

  • Related