扩展的 VSCode 错误日志在哪里? [英] Where are the VSCode error logs for extensions?

查看:114
本文介绍了扩展的 VSCode 错误日志在哪里?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我收到扩展错误时,我无法知道错误发生的原因.

When I get an extension error I have no way of knowing why the error happens.

推荐答案

据我所知,没有专门的扩展日志.在调试扩展时,您可以向控制台写注释.但是,当您在安装扩展时遇到问题时,这无济于事.但是请记住,vscode 有点像网络浏览器",因此它具有常用的浏览器开发人员工具(请参阅帮助 -> 开发人员工具),

From what I know there are no dedicated logs for extensions. When you are debugging your extension you can write notes to the console. However, when you have problems with an installed extension this won't help. But keep in mind vscode is kinda "web browser", so it has the usual browser developer tools (see Help -> Developer Tools),

这将显示运行时错误(以及这些工具通常允许的所有其他内容,包括整个 vscode DOM).在这种情况下,这可能是您的最佳选择.

which will show you runtime errors (and all the other stuff those tools allow usually, including the entire vscode DOM). That's probably the best option you have in such a scenario.

对于使用 previewHTML(或 Web 视图)的扩展程序,有一个类似的好东西,但专为 HTML 开发量身定制.使用 ctrl/cmd+shift+P 打开命令托盘并输入Webview Tools".选择匹配以打开与第一段中描述的相似的视图.但这仅适用于 previewHTML 内容,并允许您对其进行调试!此视图仅在包含 web 视图/previewHTML 的页面处于活动状态时可用,并在关闭 web 视图选项卡时自动关闭.

And for extensions that use previewHTML (or web views) there's a similar goodie, but tailored towards HTML development. Use ctrl/cmd+shift+P to open the command pallet and type "Webview Tools". Select the match to open a similar view like the one described in the first paragraph. But this one is only for the previewHTML content and allows you to debug that! This view is only available when a page containing a web view/previewHTML is active and closes automatically when the web view tab is closed.

这篇关于扩展的 VSCode 错误日志在哪里?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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