简体   繁体   中英

Xdebug with VS Code on ubuntu not working

I am trying to debug php using xdebug on ubuntu 16.04 with Visual Studio code. I installed xdebug as per the instructions from the following site- Xdebug wizard . In the xampp the php version is shown as PHP Version 5.5.6 but when i run the command php -v in terminal, it shows

PHP 7.0.15-0ubuntu0.16.04.4 (cli) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2017 Zend Technologies
with Zend OPcache v7.0.15-0ubuntu0.16.04.4, Copyright (c) 1999-2017,
by Zend Technologies

I don't know if that may cause any problem. But, the real issue is that Debugger doesn't stop at any breakpoints. Also, it sometimes shows unverified breakpoint message. Sometimes it just runs and never stop at any breakpoints. The Xdebug options don't fully show up in phpinfo() page even after the installation. I don't understand the problem.

make sure you have configure xdebug.ini file. here mine.

 [xdebug] zend_extension=xdebug.so xdebug.remote_autostart=1 xdebug.remote_log=/var/log/apache2/xdebug.log xdebug.default_enable = 1 xdebug.remote_enable=1 xdebug.remote_port=9000

须藤 apt-get 安装 php-xdebug

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