Search code examples
phpvisual-studio-codexdebug

How to turn off warnings while debugging in VS Code?


I'm debugging a PHP app in VS Code using XDebug(PHP Debug extension) and getting errors like:

VS Code PHP debugging error

I understand what the problem is and how to fix it, but the solution is so huge, that fixing such an errors is something I can't do at the moment.

I want to start using VS Code for PHP development. I was using Visual Studio with "PHP Tools for Visual Studio" and didn't have this problem.

In the first script which is loaded when the request occurs, I have error_reporting(E_ALL^E_WARNING^E_NOTICE);, which should suppress such an errors. But it seems that the VS Code debugger ignores it. I didn't find any setting for PHP Debug which could help me with this.

Is there any way how to tell VS Code Debugger to ignore/not display such errors?


Solution

  • It is possible to set where debugger stops in "Debug / Breakpoints" panel or VS Code:

    enter image description here