Unlink issue in Yii files

Anybody have any idea how to resolve this? I just switched over to VSCode and I started seeing this warning.

Exception has occurred.

Warning: unlink(C:\xampp-x64-7.4.16-0\htdocs\a2hosting\runtime/debug/20161012-032545-7640-6557.data): No such file or directory

The Yii code causing this is in LogTarget.php

    protected function removeStaleDataFiles($manifest)
    {
        $storageTags = array_map(
            function ($file) {
                return pathinfo($file, PATHINFO_FILENAME);
            },
            FileHelper::findFiles($this->module->dataPath, ['except' => ['index.data']])
        );
        $staledTags = array_diff($storageTags, array_keys($manifest));
        foreach ($staledTags as $tag) {
            @unlink($this->module->dataPath . "/$tag.data");
        }
    }

Where is this warning showing up? When running xdebug?

The file don’t seem to exist during the unlink, which usually throws an error, but the suppression @ will prevent errors from stopping your execution.

It turns out the Visual Studio Code was set to stop execution on exceptions as well as warnings and errors. I turned off the exceptions setting and now it will run. I am not sure if that is still going to be an issue however.

And yes it was showing when I was trying to debug with XDebug.

Yeah, theres is this thing with the xdebug on VSCode, and be prepared to, sometimes, have some errors thrown just because you are watching a variable that is not declared in a running code scope.