I'm trying to get PHP CLI Application debugging working in Eclipse. When I click Debug As->PHP CLI Application, it opens the Debug perspective properly, but when I step through my code, the include statements throw the warning:
include_once(): Failed opening 'database.inc' for inclusion (include_path='.') in C:\xampp\www\exec\parse_nvd_cve.php on line 30
And of course, the code dies immediately afterward because the functions in the include files are undefined.
Here is my Eclipse PHP Executable config:
- Name: XAMPP PHP
- Executable Path:
C:\xampp\php\php.exe
- PHP ini file (optional):
C:\xampp\php\php.ini
- Use system default php.ini (checked)
- Configuration SAPI Type: CLI
I've also tried un-checking "Use system default php.ini" and leaving the PHP ini file blank, all yield the same result.
And my Debug Config:
- Runtime PHP: Project default: XAMPP PHP
Debugger is XDebug and it's working fine for remote debugging of the Web Applications in the same project.
My include path is set correctly in php.ini, and it works fine when I run the same script from the command line. The file I'm attempting to include is in C:\xampp\www\inc\database.inc
. All the include files are in C:\xampp\www\inc\
and they are all in the same project.
From php.ini:
include_path=".;C:\xampp\php\PEAR;C:\xampp\www\inc;C:\xampp\www\classes"
I am using Eclipse Neon 4.6.0 Build id 20160613-1800 and XAMPP 5.6.23-0