简体   繁体   中英

Debug not working in PhpStorm with server on VM

I set myself up a Debian server on VirtualBox, everything works great except Xdebug which won't start. On server I have Symfony 3 app which use vhost admin.localwww.pl with HTTPS.

My php -v result:

PHP 7.3.31-2+0~20211022.89+debian11~1.gbp745ac7 (cli) (built: Oct 22 2021 12:37:38) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.3.31, Copyright (c) 1998-2018 Zend Technologies
    with Zend OPcache v7.3.31-2+0~20211022.89+debian11~1.gbp745ac7, Copyright (c) 1999-2018, by Zend Technologies
    with Xdebug v3.1.1, Copyright (c) 2002-2021, by Derick Rethans

My xdebug.ini

zend_extension=xdebug.so
xdebug.remote_enable = 1
xdebug.remote_host=127.0.0.1
xdebug.remote_port = 9003
xdebug.idekey = PHPSTORM
xdebug.mode=debug
xdebug.show_error_trace = 1
xdebug.remote_autostart = 1

My PhpStorm settings:

在此处输入图片说明

在此处输入图片说明

在此处输入图片说明

When I run PHP Remote Debug configuration I see this:

在此处输入图片说明

Regardless if I add ?XDEBUG_SESSION_START=PHPSTORM to the URL or if I use Xdebug Helper in Google Chrome, the effect is the same: nothing happens despite the breakpoint was set.

I use PHP CLI from remote server which is on VM:

在此处输入图片说明


EDIT: My current config but still doesn't work:

zend_extension=xdebug.so
xdebug.idekey=PHPSTORM
xdebug.mode=develop,debug
xdebug.start_with_request=yes
xdebug.client_host=127.0.0.1
xdebug.client_port = 9003

您的所有设置均参考 Xdebug 2 设置,其中您使用的是 Xdebug 3.1.1 — 请阅读升级指南: https : //xdebug.org/docs/upgrade_guide

Please use function xdebug_info() on any page for receiveing diagnostic data. Also please setup xdebug_log.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM