I have installed:
-> Xampp 3.2.2 (PHP 7.1.15),
-> XDebug "installed: 2.9.5" (version from xdebug wizard)
-> and BRACKETS 1.14 with PHP debugger extension
In debug window my buttons "RUN", "STOP" ect are greyed out and I keep seeing:
Server started listening on port: 9000 idekey: xdebug
My file brackets.json:
{
"brackets-eslint.gutterMarks": true,
"brackets-eslint.useLocalESLint": false,
"fonts.fontSize": "18px",
"fonts.fontFamily": "",
"themes.theme": "dark-theme",
"linting.collapsed": true,
"livedev.multibrowser": false,
"noDistractions": false,
"smartIndent": false,
"php-debugger.idekey": "xdebug",
"php": {
"enablePhpTooling": true,
"executablePath": "C:\\XAMPP\\php\\php.exe",
"memoryLimit": "4095M",
"validateOnType": "false"
}
}
Apache PHP.ini
output_buffering = off
(...)
[XDebug]
zend_extension = c:\xampp\php\ext\php_xdebug.dll
xdebug.default_enable=1
xdebug.idekey=xdebug
xdebug.remote_autostart = 1
xdebug.profiler_append = 0
xdebug.profiler_enable = 0
xdebug.profiler_enable_trigger = 0
xdebug.profiler_output_dir = c:\xampp\tmp
xdebug.remote_mode = req
xdebug.remote_connect_back=1
xdebug.remote_enable=1
xdebug.remote_handler = dbgp
xdebug.remote_connect_back=1
xdebug.remote_host = localhost
xdebug.remote_log = c:\xampp\tmp\xdebug.txt
xdebug.remote_port = 9000
xdebug.trace_output_dir = c:\xampp\tmp
xdebug.remote_cookie_expire_time = -9999
xdebug.show_local_vars = 0
xdebug.max_nesting_level = 1000
My file test.php
echo 'A';
echo 'B'; <- here I put breakpoint (red dot)
echo 'C';
Returns 'ABC' all the time. No matter if I use ?XDEBUG_SESSION_START=xdebug or chrome xdebug helper extension: my breakpoints are not working at all. If I type something into PHP debugger window, I am receiving:
An active debugging session is required for code evaluation.
I've tried hundreds of different settings, including changes in php.ini "on/offs" to 1/0, putting dll path into quotes, localhost to "127.0.0.1" but no one works. Of course I restarted Apache and brackets every time after setting changed. I like Brackets because it's simple look (I've just started learning php, and I wouldn't to learn complicated IDE at the time) and because of live preview feature. Thank you in advance.
Finally I found working settings. Maybe this will help someone:
(...)
output_buffering = off
(...)
[XDebug]
zend_extension = c:\xampp\php\ext\php_xdebug.dll
xdebug.default_enable = 1
xdebug.idekey = "xdebug"
xdebug.remote_autostart = 0
xdebug.profiler_append = 0
xdebug.profiler_enable = 0
xdebug.profiler_enable_trigger = 1
xdebug.profiler_output_dir = "c:\xampp\tmp"
xdebug.profiler_output_name = "cachegrind.out.%t-%s"
xdebug.remote_connect_back = 0
xdebug.remote_enable = 1
xdebug.remote_handler = "dbgp"
xdebug.remote_mode=req
xdebug.remote_connect_back=0
xdebug.remote_host = 127.0.0.1
xdebug.remote_log = "c:\xampp\tmp\xdebug.txt"
xdebug.remote_port = 9000
xdebug.trace_output_dir = "c:\xampp\tmp"
xdebug.remote_cookie_expire_time = -9999
xdebug.show_local_vars = 0
xdebug.max_nesting_level = 1000
I am receiving sometimes "live preview" error, but this is another case to solve, not strictly related to xdebug, I believe...