4

Looking for some advice. Changed servers and I have setup Xdebug. PhpStorm detects it enabled, so does PHP, although I cannot get it to work.

(Firewall port opened, my firewall disabled, settings all configured, but I am getting nothing)

In order to identify the issue, I need to be able to see the Log of Xdebug, but I cannot get it to output anything. I tried it without a log file, then I have also created a log file and given Apache access to it, but still nothing.

I am running CentOS 8 Apache - Log_Debug enabled Running on php7.3

PHP - track_erorr enabled.

/opt/plesk/php/7.3/etc/php.d/50-xdebug.ini

; Enable xdebug extension module
zend_extension=xdebug.so
xdebug.default_enable = 1
xdebug.idekey = "PHPStorm"
xdebug.remote_enable = 1
xdebug.remote_autostart = 0
xdebug.remote_port = 9000
xdebug.remote_handler=dbgp
xdebug.remote_log="/tmp/xdebug.log"
xdebug.remote_host=123.123.123.123

(IP has been changed for obvious reasons)

Can anyone tell me why I cannot get Xdebug to write out any errors or connection attempts to: /tmp/xdebug.log

Here is my phpinfo() debug info:

enter image description here

5
  • 1
    XDEBUG 3 has changed quite a bit specially in the config. Checkout the Upgrade Notes Commented Dec 4, 2020 at 17:07
  • 1
    But I think if you set xdebug.log = "Some/path/to/a/file.txt" it will get you logging Commented Dec 4, 2020 at 17:08
  • 1
    You could also add xdebug.mode =develop,debug to activate the step debugging mode, in fact this may be all you need to get the debugger working Commented Dec 4, 2020 at 17:10
  • @DaveHamilton Use Xdebug 3 config parameters -- just like your screenshot says. Commented Dec 4, 2020 at 17:29
  • @RiggsFolly, on one of our developers machines it wouldn't stop at a breakpoint or work at all and we couldn't get the log to work either. He was running PHPStorm and tried debugging code on a Vagrant/Homestead VM environment using XDebug 3.1.2. Setting the line xdebug.mode=develop,debug did the trick. Commented Jul 7, 2022 at 14:44

1 Answer 1

4

Thanks for the comments, I didn't noticed Xdebug has updated its self. After removing all previous reference i re-setup the the debug.ini (I dont store custom ini settings in php.ini i reference them correctly)

Here is my updated xdebug.ini This works by using the browser Plug-in to enable to the Debugger mode

zend_extension=xdebug.so
xdebug.client_host = 123.123.123.132
xdebug.client_port = 9000
xdebug.connect_timeout_ms = 200
xdebug.force_display_errors = 1
xdebug.force_error_reporting = 1
xdebug.idekey = PHPStorm
xdebug.log = /tmp/xdebug.log 
xdebug.log_level = 7
xdebug.mode = debug
xdebug.output_dir = /tmp

All default settings can be found here: https://github.com/xdebug/xdebug/blob/master/xdebug.ini

Sign up to request clarification or add additional context in comments.

1 Comment

You should be using a port other than 9000, other things use that now and XDEBUG has suggested 9003 instead to stop conflicts, in fact 9003 is the default so you could remove the xdebug.client_port = 9000 line

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.