New in 3.0: Support of profiling with Zend Debugger
Sometime ago we announced integration with Xdebug profiler in PhpStorm 3.0. This time we want to introduce you integration with another popular CPU profiling extension for PHP – Zend Debugger.
The set of views which PhpStorm builds by analyzing a Zend Debugger profiler snapshot is the same as for the Xdebug profiler:
- ‘Execution Statistics’ – displays summary information about execution metrics for every called function/method.
- ‘Call Tree’ – displays the execution paths of the called functions.
- ‘Callees’ – same as ‘Call Tree’ but with the selected function as the root.
- ‘Callers’ – all the paths that can result in calling the selected function.
In order to start a profiling session you need to install and configure the Zend Debugger extension. If you have already configured Zend Debugger for debugging, use this configuration for profiling. Alternatively, follow the Zend Debugger installation guide.
Next, you need to enable Zend Debugger to start capturing profiling snapshots on the required web pages. Just like during a debugging session, you need special cookies set in your web browser. You can do it manually, but it would be handier to use our browser bookmarklets which will set all the necessary cookies for you.
Let’t start profiling with Zend Debugger and browser bookmarklets
- Open IDE
- Enable listening for incoming connections from Zend Debugger
- Open browser and navigate to the web page you want to profile
- Click the ‘zend Start Profiler’ bookmark
- Refresh the page
- Switch to the IDE and accept the incoming connection from Zend Debugger (this dialog will appear only once, if you have never accepted connections from this host before)
- Let’s start hunting for bottlenecks in your code!
- After you have finished your profiling session, click the ‘zend Stop profiler’bookmark to stop capturing profiling snapshots (it will remove the cookie which triggers profiling)
PhpStorm 3.0 download is available on official download page.
Develop with pleasure!
Working with Windows Azure SQL Database in PhpStorm
PhpStorm provides us the possibility to connect to Windows Azure SQL Database right from within the IDE. In this post, we’ll explore several options that are available for working with Windows Azure SQL Database (or database systems like SQL Server, MySQL, PostgreSQL or Oracle, for that matter): …
Change signature refactoring in PhpStorm
A very powerful refactoring is the Change signature refactoring in PhpStorm. It enables us to modify a function signature in many ways: we can change the function name, change its visibility, add, remove and reorder parameters as well as rename parameters. (more…)…
Folding for imports in PhpStorm 6.0
In PhpStorm 6, we've introduced code folding for imports. Any list of imports will now be folded into a single line. This greatly reduced clutter in your editor when having a lot of imports! (more…)…
Drag & Drop Project Files to Remote Hosts in PhpStorm
The Remote Host pane allows us to work directly on a remote server through FTP, FTPS, SFTP or a local/network folder. A lot of people asked us to add drag & drop to the Remote Host pane in PhpStorm. Good news: PhpStorm 6 comes with drag & drop as well as copy & paste support from the pro…