Book Image

PhpStorm Cookbook

By : Mukund Chaudhary
Book Image

PhpStorm Cookbook

By: Mukund Chaudhary

Overview of this book

Table of Contents (16 chapters)
PhpStorm Cookbook
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

Creating exception breakpoints


There is new information for your brain to absorb. Until this point in time, you assumed that a breakpoint can be created only manually when you suspected some line of code might be problematic. But you can actually create a breakpoint to be hit when an exception is hit. This type of breakpoint is known as exception breakpoint. The question that comes to mind is "what is the reason for this name?" This breakpoint gets activated on encountering an exception.

How to do it...

To create a new exception breakpoint, you just need to remember a few small steps:

  1. Inside the editor, press Ctrl + Shift + F8, where there will be a pop up.

  2. In the left-hand top corner, there is the + sign, press it and you will get an option to create an exception breakpoint.

  3. On proceeding, you will be asked to enter the name of the exception at which you want the execution to halt.

  4. You can also make a customization in the way the breakpoint will behave. You can ask PhpStorm to activate this breakpoint...