Methods to step-by-step run the code in PyCharm: 1. Set breakpoints; 2. Start a debugging session; 3. Step through the code; 4. Step out of the code; 5. Run to the cursor; 6. Return to normal implement.
Run the code step by step in PyCharm
In PyCharm, you can run the code step by step as follows:
1. Set a breakpoint
F8
. 2. Start a debugging session
Ctrl
Alt
D
). 3. Step through the code
F10 (Mac): Step through the code, one line at a time.
F11 (Mac): Step into functions. 4. Step out of the code
F11 (Windows/Linux) or Fn
Shift
F11 (Mac): Step out of a function. 5. Run to the cursor
F9 (Windows/Linux) or Option
F9 (Mac): Run code from the current cursor position until the next breakpoint is encountered. 6. Resume normal execution
F5 (Mac): Resumes normal code execution, skipping all breakpoints. Tip:
Ctrl
Shift
F8
to find all breakpoints in your project. The above is the detailed content of How to run pycharm step by step. For more information, please follow other related articles on the PHP Chinese website!