Free PHP Debugger in CodeLobster IDE
The internal free PHP Debugger is a suit of free tools for validating PHP code locally before
uploading it to a web server.
Before running Debugger you should configure it in the Preferences menu:
- Select Tools-->Preferences-->Debugger
- In the left grid choose Debug item and click General property
-
In the right grid set appropriate values for the following properties:
- Virtual folder - path to a project virtual folder
- Virtual host URL - virtual folder URL
- Path to php.ini - path to the php.ini file
-
Server - Apache version running on your computer.
Select it from the dropdown list displayed all Apache versions installed on your machine.
Tools used during debugging:
- Breakpoints
- Tooltips
- Locals control
- Watch control
- Call Stack control
- URL Debugging
- Debugger handling
1. Breakpoints
Breakpoint is a marker that stops execution of the application at the line it is placed on.
To add breakpoint:
- Click dark grey area next to necessary line of PHP code or place the pointer on it and move to Debug|Add/Remove Breakpoint (or click red bubble-shaped button on the Debugger toolbar).
- At the left of the line red bubble-shaped marker will appear
The same procedures are used for removing breakpoints.
2. Tooltips
This feature allows reviewing variables values on the fly when breakpoint is reached.
To review value:
- Place the pointer over the variable
- The value will be highlighted in a tooltip box
3. Locals control
Locals control displays both Global and Local variables, their values and type.
4. Watch control
In the Watch window you can place variables, objects and expressions you want to monitor while debugging
5. Call stack controlThere are two ways for adding watches:
-
Place the pointer on necessary element, select Add watch (Shift+F8) from the mouse right click menu
-
Copy-Past element name into the Name column
Call Stack window contains all functions called while debugging.
To jump to declaration of a function, double click a line with a function name in the Call Stack window.
To jump to declaration of a function, double click a line with a function name in the Call Stack window.
6. URL debugging
This ability enables you to debug URL.
To start debugging:
- Move to Debug|Debug URL or press F8
- In the appearing URL Dialog specify path in the URL field
7. Handling debugging process
You can handle debugging process from Debugger menu
or using Debugger toolbar
or using Debugger toolbar