Search code examples
phpvisual-studio-codexdebug

How to avoid step into vendor/framework code with Xdebug?


With VSCODE with PHP Debug extension, using the Xdebug debugger for PHP, there is a way to filter the vendor/framework code when debugging to avoid "step into" that code?


Solution

  • From the example in the official documentation, at https://xdebug.org/docs/all_functions#xdebug_set_filter

    xdebug_set_filter( XDEBUG_FILTER_TRACING, XDEBUG_PATH_EXCLUDE, [ __DIR__ . "/vendor/" ] );