The Studio supports two types of PHP debugging:
This page will guide you through the setup process and the debugging process when a single script is debugged.
The single-script mode is a quick way to debug through the functionality of a single PHP file. In case you are debugging a PHP application, you will find that a 'Web Page' debugging is the way to go.
A PHP Script debug session uses a local PHP interpreter and a debugger extension defined in its php.ini.
In order to attach an interpreter:
When you attach a php.ini location to the interpreter settings, you will be able to perform some extension related actions:
A little bit on the validation process:
When you hit the Validate button, the PHP interpreter will try to execute the current php.ini settings and collect the errors/warnings.
This validation can be used to determine which of the extensions triggered warnings, or even triggered fatal errors and could not be loaded. At the end of the validation, question marks next to the extensions will be replaced with appropriate icons (Error, Warning, or OK).
Hovering over the extension line displays the error/warning message that the PHP process outputted when it was validating.
In general, any fatal extension should be commented out to allow the PHP process function currently.
|This process is no a "100% bullet-proof", and in some cases where the PHP process fails to load, a deeper investigation might be needed to determine the cause.|
The Studio debugger works with XDebug and ZendDebugger extensions. Both can be attached via the INI editor we described above.
Once you have a PHP interpreter set up correctly, you can attach a debugger extension to the php.ini.
Once it's all set-up, you are ready for a script Debug (or Run) session.
A session can be initiated in several different ways.
Click Run in the application menu bar and then click Debug Configurations.... Create a new PHP Script debug configuration. Make sure that the selected debugger-type match the type that was set for the selected PHP executable, then launch the session.
The same applies to a Run session that only runs the script and output to the console.