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:

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
PHP debugger breakpoints
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
PHP debugger tooltips for values

3. Locals control
Locals control displays both Global and Local variables, their values and type.
PHP debugger locals control

4. Watch control
In the Watch window you can place variables, objects and expressions you want to monitor while debugging
PHP debugging - watch control

There are two ways for adding watches:

  • Place the pointer on necessary element, select Add watch (Shift+F8) from the mouse right click menu

    PHP debugger - add watch from the menu

  • Copy-Past element name into the Name column

    PHP debugger - add watches in the control
To delete element from the Watch dialog, select necessary one and press Delete key or use Delete option from the mouse right-click menu.
5. Call stack control
Call Stack window contains all functions called while debugging.
PHP debugging - call stack control

To jump to declaration of a function, double click a line with a function name in the Call Stack window.
PHP debugger - jump to declaration of a function

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
free PHP debugger - debug URL

7. Handling debugging process
You can handle debugging process from Debugger menu
PHP debugger - handling debugging process from the menu

or using Debugger toolbar
PHP debugger - handle debugging process from the toolbar

© Copyright by CodeLobster Software