Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
MASTERING PYCHARM

You're reading from   MASTERING PYCHARM Use PyCharm with fluid efficiency to write idiomatic python code

Arrow left icon
Product type Paperback
Published in Oct 2015
Publisher
ISBN-13 9781783551316
Length 232 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Nafiul Islam Nafiul Islam
Author Profile Icon Nafiul Islam
Nafiul Islam
Arrow right icon
View More author details
Toc

Running, debugging, and setting breakpoints

You can run a .py file in two modes: running and debugging. If you run a program, then even if you set breakpoints (points at which PyCharm will stop program execution), nothing will happen. It's only when you run it in debug mode that breakpoints become effective. The way I like to run or debug my programs is through the Resume Program action:

Running, debugging, and setting breakpoints

You can then choose any of the different ways to run/debug your program. By default, if you press Enter, you will go into debug mode, if you press Shift + Enter, the program will just run. You can also choose coverage by pressing the left arrow:

Running, debugging, and setting breakpoints

As soon as you start debugging, a window appears underneath and you have so many options that it's hard to make sense of it all. Let's focus on managing breakpoints for now. To the bottom-left of the window, you can see a bunch of buttons:

Running, debugging, and setting breakpoints

This is the View Breakpoints button. This allows you to see different types of breakpoints that are available to...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €18.99/month. Cancel anytime