当我尝试在 Vs Code 中调试 Flutter 应用程序时,它会很好地命中断点,但是当我将鼠标悬停在任何变量上以查看其值时,我会收到“<optimized out><error>:<Invalid params>”工具提示。\ n这是在我从 3.7 升级到 3.10 后开始的。\n在 macos 和 ios 调试(包括模拟器和实际的 iphone)中都会发生。
\n我尝试了以下步骤但没有帮助:
\n我可以使用 print 语句获取变量的值,这是我现在可以进行调试的唯一方法。\n我还删除了 flutter sdk 的 bin/cache 目录。
\nflutter doctor -v
:
[\xe2\x9c\x93] Flutter (Channel stable, 3.10.0, on macOS 13.3.1 22E772610a darwin-arm64, locale en-US)\n \xe2\x80\xa2 Flutter version 3.10.0 on channel stable at /Users/aykut/Projects/flutter\n \xe2\x80\xa2 Upstream repository https://github.com/flutter/flutter.git\n \xe2\x80\xa2 Framework …
Run Code Online (Sandbox Code Playgroud) 有没有办法从 web api 2 中的操作中捕获并记录错误请求或未经授权的响应代码?我尝试添加 onactionexecuted attributefilter 和 ExceptionLogger 但它们都不起作用。
public IHttpActionResult ConfirmUpload(string val)
{
if (String.IsNullOrWhiteSpace(val))
return BadRequest(val);
}
public static void Register(HttpConfiguration config)
{
AreaRegistration.RegisterAllAreas();
config.Filters.Add(new ErrorLogAttribute());
config.Services.Add(typeof(IExceptionLogger), new ErrorLogger());
}
Run Code Online (Sandbox Code Playgroud)
任何帮助表示赞赏。