I was config success to debug in PHP on VSCode.
My problem is when I run the project it always errors at the function:
protected function getJsonPayl
Had the same issue when using Docker with VsCode and xDebug in Laravel.
For anyone interested in a different approach (since Laravel 5.6 there is no optimize
command anymore)
Just add the ignore
section to your launch.json
config.
{
"name": "Listen for XDebug",
"type": "php",
"request": "launch",
"port": 9000,
"pathMappings": {
"/var/www/html": "${workspaceRoot}",
},
// add this
"ignore": [
"**/vendor/**/*.php"
]
},
Solved the issue for me.
Got this from Docker Github Repo