How to trace variables in PyCharm

Step 1

Click at the left of the line where you want to trace the variable.

Step 2

Right click the file at the project explorer and click Debug.

Step 3

In the debugger window, you can see the value of that variable before executing the line.

Step 4

Press F8 or click the “Step Over” button on the Debug panel to move the debug pointer by one line.

Now, you can see the modified value of the variable after executing the line and before executing the next line.

Step 5

To stop debugging and execution, press the stop button on the Debug panel or the top bar.

One response to “How to trace variables in PyCharm”

Leave a Reply

Your email address will not be published.