在 VS Code 中调试时如何关闭警告? [英] How to turn off warnings while debugging in VS Code?

查看:48
本文介绍了在 VS Code 中调试时如何关闭警告?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 XDebug(PHP Debug 扩展)在 VS Code 中调试 PHP 应用程序,并收到如下错误:

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.

我想开始使用 VS Code 进行 PHP 开发.我将 Visual Studio 与用于 Visual Studio 的 PHP 工具"结合使用,但没有遇到此问题.

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.

在请求发生时加载的第一个脚本中,我有 error_reporting(E_ALL^E_WARNING^E_NOTICE);,它应该抑制这样的错误.但似乎 VS Code 调试器忽略了它.我没有找到任何可以帮助我解决此问题的 PHP 调试 设置.

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.

有什么方法可以告诉 VS Code Debugger 忽略/不显示此类错误吗?

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

推荐答案

可以在Debug/Breakpoints"面板或 VS Code 中设置调试器停止的位置:

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

这篇关于在 VS Code 中调试时如何关闭警告?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆