I'm debugging a Laravel project with PHP Tools Debugger in vscode and it's repeatedly pausing on exceptions within the AuthServiceProvider class.
I already have disabled exceptions in the debugger settings.

Additionally, I added this ignore pattern to the launch.json -

      "ignore": [
        "**/vendor/**/*",
        "**/App/Providers/**"
      ]

Question:
Is there something else I need to do to disable exceptions on this particular file?

Here's the error:

"Uncaught ReflectionException: Class "App\Policies\ModelPolicy" does not exist in Command line code:1
Stack trace:
#0 Command line code(1): ReflectionClass->__construct('App\\Policies\\Mo...')
#1 [internal function]: {closure}('App\\Policies\\Mo...', 'App\\Model')
#2 Command line code(1): array_map(Object(Closure), Array, Array)
#3 {main}  thrown"

    Hello Franklin,

    Thanks for the question.

    We always break on fatal errors which cause PHP requests to die - they should be handled anyway.

    In this case, there are probably some files missing.

    Is there any particular scenario where it would be beneficial to be quiet about fatal errors?

    Thanks!

    I’m not even sure where the requests are coming from so I’m not sure why it’s happening in the first place.
    When I make a request from my application everything works fine.
    The error is occurring every 20 seconds or so without any user interaction.

      MiloslavBeno
      I’m my situation it would be beneficial to quiet fatal exceptions that occur on files that being ignored.

        Hi Franklin,

        Thank you for explaining your situation in greater detail. I guess there is some ajax request which executes the code.

        Anyway, we think it might be beneficial to have the breakpoint category "Uncaught Exceptions", if unchecked the PHP request would die quietly.

        Btw. you can also alter your php.ini and only initiate XDebug when explicitly requested. The ajax requests that you don't care about would be executed without debugging them at all.

        xdebug.start_with_request=trigger

        Thanks again

          Hi Franklin,

          Thanks again for the feedback.

          1.) We will introduce "Uncaught Exceptions" in the next preview version, so you can opt out if you want
          2.) But the ignore filter should have worked too - better option in this case, so you will still get uncaught exceptions in your code. We'll take a look at it

          Thank you!

            6 days later

            @franklin113 thank you for your feedback! we have introduced "uncaught exceptions" checkbox in Debug panel

            Please update to v1.17 and let us know if there would be anything else we can help with.

              Write a Reply...