如何在 vscode 中搜索调试控制台? [英] How to search the debug console in vscode?

查看:42
本文介绍了如何在 vscode 中搜索调试控制台?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是

(点击图片放大.在动画右上角寻找过滤器)


以及即将推出的

This is currently a feature request, so I know the answer isn't straight forward, but I assume some clever people found clever workarounds for this.

One way is to copy/paste the output in some text editor, but ew.

Someone suggested redirecting the debug output to the terminal, which does have a search feature, sounds better.

So, the question is, how does one redirect the debug output to the terminal?

Unless, of course, you have an even better solution.

EDIT (from the GitHub thread)

You can use the property "console": "integratedTerminal" on the debug launch task to redirect the output to the terminal.

解决方案

Since August 2020 and VSCode 1.49, the Debug Console does support filtering:

Debug Console filter

The Debug Console now supports filtering, making it easier for users to find the output they are looking for, or to hide irrelevant logging output.

The filter also supports exclude patterns (for example, patterns starting with an exclamation mark !).
The filter only applies to program output but not to evaluations run by a user.

Like other input boxes in VS Code, you can use the up and down arrow keys to navigate between old filter inputs.

In the short video below, the output is filtered to entries that include the text 'http', do not include the text 'http' (using the filter !http), and then include the word 'Severity':

(Click on the picture to enlarge. Look for the filter at the top right section of the animation)


And with the upcoming Sept. 2020 VSCode 1.50, you know where you are in your search:

Since last milestone the Debug Console supports filtering, making it easier for users to find the output they are looking for, or to hide irrelevant logging output.

Now we have added a badge to make it clear how many items are filtered away.

这篇关于如何在 vscode 中搜索调试控制台?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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