Debugging PHP

PHPoC provides run-time debugging function. Buttons for debugging are enabled when you check the PHP debug mode option in PHPoC Debugger. In this mode, you can set break points or check values of variables at every code line.


Once the PHP Debug Mode is activated, debugging buttons are available. You can debug your script with this buttons through the [Watch] window.


Simple Tutorial

  1. Activate the PHP Debug Mode.
  2. Write the following code on init.php and upload it.

    $var_int = 1;
    $var_str = "abc";
    $var_arr = array(1, 2);
  3. Clicking the right button on your mouse and select [Add] menu.

  4. Enter "var_int" in the textbox as a name of variable and click [Add] button.

  5. Add the following variables in the same way.

    • var_str
    • var_arr
    • var_arr[0]
    • var_arr[1]
  6. Check values of variables in the [Watch] window while running the script line-by-line using Step-In(F11) button.


※ Caution: In the case of a variable which is an array, key has to be specified with name of array to watch the value