PHP version: 7.1
XDebug version: 2.5.1
Adapter version: 1.10.0
Your launch.json:
{
"name": "Listen for XDebug",
"type": "php",
"request": "launch",
"port": 9000,
"localSourceRoot": "${workspaceRoot}/myplugin/",
"serverSourceRoot": "/var/www/html/wp-content/plugins/myplugin/"
}
XDebug php.ini config:
xdebug.remote_enable = 1
xdebug.remote_autostart = 1
xdebug.remote_connect_back = 0
xdebug.remote_host = 192.168.0.150
xdebug.remote_port = 9000
xdebug.remote_log = "/tmp/xdebug_log/xdebug.log"
xdebug.default_enable = true
xdebug.html_errors = true
For Wordpress plugin development I have only shared one directory in my repo with the Wordpress container and mounted it inside Wordpress' plugins directory.
xDebug and your fabulous vscode extension work wonderfully and breakpoints and everything works like a charm.
However, when there is an error that bubbles up in one of Wordpress' php files, the extension tries to map that to a local file, which it can't find of course. Totally understandable. It is very annoying though that vscode creates an error popup for that every time.
I am not sure what the best solution is:
- I can mount the entire Wordpress directory (Don't want to do that though)
- The xDebug-adapter could not report the error to vscode
- vscode could introduce a setting to selectively ignore errors from plugins
I am open to any suggestion, if changing this in this adapter is the wrong way to go.
PHP version: 7.1
XDebug version: 2.5.1
Adapter version: 1.10.0
Your launch.json:
XDebug php.ini config:
For Wordpress plugin development I have only shared one directory in my repo with the Wordpress container and mounted it inside Wordpress' plugins directory.
xDebug and your fabulous vscode extension work wonderfully and breakpoints and everything works like a charm.
However, when there is an error that bubbles up in one of Wordpress' php files, the extension tries to map that to a local file, which it can't find of course. Totally understandable. It is very annoying though that vscode creates an error popup for that every time.
I am not sure what the best solution is:
I am open to any suggestion, if changing this in this adapter is the wrong way to go.