You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

重装VS Code后出现page_load_metrics错误且Chrome标签页自动关闭求助

问题描述

长期使用VS Code,因电脑系统损坏重装软件后,控制台频繁抛出页面加载指标相关错误。程序本身可正常运行,但最终Chrome标签页会自动关闭。已尝试重启电脑、重装软件,问题仍未解决。

错误日志:

[12904:2880:0419/145538.693:ERROR:page_load_metrics_update_dispatcher.cc(178)] Invalid first_paint (unset) for first_image_paint 2.993 s
[12904:2880:0419/145538.701:ERROR:page_load_metrics_update_dispatcher.cc(178)] Invalid first_paint 3.124 s for first_image_paint 2.993 s
[12904:2880:0419/145538.846:ERROR:page_load_metrics_update_dispatcher.cc(178)] Invalid first_paint 3.124 s for first_image_paint 2.993 s
[12904:2880:0419/145539.031:ERROR:page_load_metrics_update_dispatcher.cc(178)] Invalid first_paint 3.124 s for first_image_paint 2.993 s
[12904:2880:0419/145539.238:ERROR:page_load_metrics_update_dispatcher.cc(178)] Invalid first_paint 3.124 s for first_image_paint 2.993 s
[12904:2880:0419/145539.305:ERROR:page_load_metrics_update_dispatcher.cc(178)] Invalid first_paint 3.124 s for first_image_paint 2.993 s
[12904:2880:0419/145539.576:ERROR:page_load_metrics_update_dispatcher.cc(178)] Invalid first_paint 3.124 s for first_image_paint 2.993 s
[12904:2880:0419/145539.872:ERROR:page_load_metrics_update_dispatcher.cc(178)] Invalid first_paint 3.124 s for first_image_paint 2.993 s
[12904:2880:0419/145539.934:ERROR:page_load_metrics_update_dispatcher.cc(178)] Invalid first_paint 3.124 s for first_image_paint 2.993 s

可行解决步骤

  • 清理VS Code缓存:
    打开VS Code,按下Ctrl+Shift+P(Windows/Linux)或Cmd+Shift+P(Mac),依次执行Clear Editor History和Clear Workspace Cache。关闭软件后手动删除对应系统的缓存文件夹:

    • Windows:%APPDATA%\Code\Cache、%APPDATA%\Code\CachedData
    • Mac:~/Library/Application Support/Code/Cache、~/Library/Application Support/Code/CachedData
    • Linux:~/.config/Code/Cache、~/.config/Code/CachedData
  • 排查扩展冲突:
    按下Ctrl+Shift+X打开扩展面板,点击右上角的...选择Disable All Installed Extensions,重启VS Code后测试。若问题消失,逐个启用扩展,定位到引发问题的扩展后卸载或更新。

  • 禁用Chrome页面加载计时功能:
    打开VS Code设置(Ctrl+,),搜索Debug: Chrome Debugger Args,添加参数--disable-features=PaintTimingMetrics,避免页面加载指标冲突触发错误。

  • 重置VS Code默认设置:
    按下Ctrl+Shift+P输入Preferences: Reset Settings,恢复默认设置,排除自定义配置导致的异常。

内容的提问来源于stack exchange,提问作者C. A. F.

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.24 11:55:42