HOWTO: Install debugger module
Installing the debugger using Project Settings Wizard (guided installation)
Installing the debugger without Wizard (manual installation)
- Start NuSphere PhpED IDE
- If you don't have projects, please create one and Wizard will start automatically
- Open Project -> Project Properties dialog and click [Wizard] button at the bottom
- Proceed with Project Settings Wizard. It will inspect your php and web server configuration. If debugger is not yet installed, it will suggest how to install debugger, then it will check the debugger functionality.
NOTE: You will need dbg-wizard.php script on your server. Wizard can upload it for you if project has an associated publishing account.
- PHP should be installed and properly configured (see this page for instructions on how to install PHP)
- Create a simple script shown below and run it using your favorite browser
- Locate path to php.ini listed in phpinfo's topmost header. This file will be needed in steps 4, 7, and 8 below
- Make sure extension_dir shown in phpinfo page is not ./ otherwise please set extension_dir to have an absolute path. For example "c:\php5\ext" under Windows or "/usr/lib/php5/modules" under unix.
- Find php debugger module for the target server platform
in %PROGRAMFILES%\NuSphere\PhpED\debugger\server directory, for example C:\Program Files (x86)\NuSphere\PhpED\debugger\server\Windows or
C:\Program Files (x86)\NuSphere\PhpED\debugger\server\Linux for Windows and Linux respectively. Debugger modules for all platforms
except Windows are packed into tar.gz archive. All archives have directories with supported CPU type as directory name and thread safety indicator _TS appended to its name (if appropriate) at the first level.
Debugger module files indicate php version they are compatible with. For example, debugger 5.0.7 module for php 5.3, thread safe, for FreeBSD x86 32bit platform will be found
in dbg-5.0.7-FreeBSD.tar.gz archive, x86_TS subdirectory and file name will be dbg-php-5.3.so.
Please see "Debugging PHP on various platforms" for
the table of all supported platforms and the corresponding debugger modules.
- Copy selected module into extension_dir directory on the server.
- Pick correct zend_extension_ts vs zend_extension line to load the module and add it to php.ini
If the OS is Windows and Thread Safety is enabled and php version is 5.2 or below:
if the OS is Windows and Thread Safety is disabled or php version is 5.3 or above:
if the OS is UNIX and Thread Safety is disabled or php version is 5.3 or above:
if the OS is UNIX and Thread Safety is enabled and php version is 5.2 or below:
-This line should appear before any other zend_extension(s) unless you're using IonCube. In latter case, debugger should be placed below it.
-If you run 32bit php (under for example 32bit apache), you have to load 32bit debugger module even though the OS is 64bit.
-Starting with version 5.3, php does not support zend_extension_ts anymore. With this version, you always have to use only zend_extension.
- Add the following debugger settings to php.ini
debugger.hosts_allow=host1 host2 host3
-host1 host2 and host3 are host names or IP addresses of development machines allowed to start debug sessions. If you run debugger through SSH tunnel, you have to add only localhost.
-7869, 10000/16 means port 7869 and all ports in range from 10000 to 10015 are allowed
-debugger.hosts_deny=ALL means prohibit all except allowed
- Restart web server (you have to restart IIS Admin service if you're using IIS)
- Launch phpinfo and check the output. Make sure that the topmost header contains:
Zend Engine v2.5.0, Copyright (c) 1998-2013 Zend Technologies with DBG v5.0.x, (C) 2000,2013, by Dmitri Dmitrienko
- If server stopped showing phpinfo page or debugger did not appear on this page, please check these installation troubleshooing
- It's recommended to check the results using Project Settings Wizard