There are two ways to run part of the code in PyCharm: Run a selected block of code: Select the code and press Ctrl / (Windows/Linux) or Cmd / (macOS), select "Run selected text". Using the debugger: Place the cursor on the line of code you want to run, press F9, and click the Run to Cursor button.
Run part of the code in PyCharm
How to execute it?
To run part of the code in PyCharm, you can use the following two methods:
1. Run the selected code block
Ctrl
/
(Windows/Linux) or Cmd
/
(macOS) to open More Actions "menu. 2. Using the debugger
F9
to open the debugging tool window. Detailed steps
Run the selected code block
Ctrl
/
or Cmd
/
to open the "More Actions" menu. Using the Debugger
F9
to open the debugging tool window. Tip
The above is the detailed content of How to run part of the code in pycharm. For more information, please follow other related articles on the PHP Chinese website!