I'm debugging a PHP app in VS Code using XDebug(PHP Debug
extension) and getting errors like:
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?
Use a preprocessor directiveUse a #pragma warning (C#) or Disable (Visual Basic) directive to suppress the warning for only a specific line of code.
Turn off the warning for a project in Visual StudioSelect the Configuration Properties > C/C++ > Advanced property page. Edit the Disable Specific Warnings property to add 4996 . Choose OK to apply your changes.
Search for debug in settings, disable "glyph margin", and all related settings, this will disable the option to make debugging dots, if you just want to remove them all but not disable adding them, use the answers above.
It is possible to set where debugger stops in "Debug / Breakpoints" panel or VS Code:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With