The Studio supports two types of PHP debugging:
- Internal debugging (e.g. for example, Script debug without a server-side involvement).
- Web Page debugging that uses a debugger extension (either Zend or XDebug) installed on a server.
When you hit the Validate button, the PHP interpreter will try to execute with 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.|
A session can be initiated in a several different ways.
- Right-click the editor area and select 'Debug As'->'PHP Script'.
- You will be prompted to move to the debug perspective - Click yes.
- In that perspective, you will see the debug stack, variables, and breakpoints views. You can also add more views , like the Expressions view to track any Watch expressions you add.
- From here, you can do a step into, step over and step return by clicking the buttons on the stack view or by using F5/F6/F7 keys.
- You can set more breakpoints as you debug, or even run to a line that you mark (right-click + 'Run to line' action , or Ctrl+R).
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.