Debugging with Smart Step-into

While debugging PHP code, we may sometimes reach a line of code which calls several methods. When debugging these lines of code, the debugger typically allows us to use Step Into and leads us through all child functions and then back to the parent function. But what if we only wanted to step into one child function? With Smart Step-Into in the PhpStorm 7 EAP, we’ve reintroduced a handy feature which does just that: it allows us to choose the function to step into.

In the above example, merge_strings(hello(), world()), the debugger would step into hello(), then world() and finally merge_strings(). If we use Smart Step-Into from the Run | Smart Step Into menu or by pressing Shift+F7, PhpStorm will allow us to choose the function to step into:

Note that this functionality also works with more dynamic function calls:

Give PhpStorm 7 EAP a try and let us hear your thoughts in the issue tracker, the comments below or in our forums!

Develop with pleasure!
– JetBrains PhpStorm Team

This entry was posted in Cool Feature, Early Access Program and tagged , , , , . Bookmark the permalink.

3 Responses to Debugging with Smart Step-into

  1. Johannes Hardmeier says:

    Very cool (and thoroughly needed) feature. Hope you can choose more than one function to step into. (I might want to see how my string is created -> in hello() and in world() – but certainly not, how they are merged.

    • Maarten Balliauw says:

      You can choose the function to step into. However if you choose one that’s farther down the call stack, the debugger may skip some higher functions. Unless you add additional breakpoints there, of course.

  2. Pingback: PhpStorm 7.0リリース | JetBrains ブログ

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">