I installed Xdebug and checked with phpinfo().
I tried debugging public/index.php with "Launch currently open script" option and it worked fine.
Defining a route for testing, a controller, I started the "Listen for Xdebug" option, and then, I went to that url in my browser. But nothing happens at the preselected breakpoint.
launch.json
"configurations": [
{
"name": "Listen for Xdebug",
"type": "php",
"request": "launch",
"port": 9003,
"log": true
},
xdebug.ini
zend_extension=xdebug.so
xdebug.remote_autostart = 1
xdebug.remote_enable = 1
xdebug.remote_handler = dbgp
xdebug.remote_host = 127.0.0.1
xdebug.remote_log = /tmp/xdebug_remote.log
xdebug.remote_mode = req
xdebug.remote_port = 9003
- PHP 7.2
- Laravel 5.6
- Ubuntu 20.04
- Xdebug 3.1.2