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

Watching expressions and variables


The most important utility of a debugger is that it actually provides you with X-Ray goggles with which you can see through opaque objects.

This phenomenon of see-ing through the opaque object (call it execution) is known as watching. It is synonymous with real-world watching. Do you watch something? You constantly pay attention to what is happening around that something to watch it. Daddy says, "I will see you son," and across the globe irrespective of the location, the problem of the son getting worried arises. But is the PhpStorm watching feature expected to worry you?

How to do it...

If you are determined to watch the whereabouts and howabouts of a variable, you can ask PhpStorm to do that for you. When you start debugging, in the debug window, there are three frames: Frames, Variables, and Watches open by default. To add variables to the watch feature, there are two methods:

  • If that variable appears in the list of variables covered up to that point, you...