Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to search the debug console in vscode?

Tags:

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.

like image 959
Félix Paradis Avatar asked Jul 10 '18 14:07

Félix Paradis


People also ask

How do I search in Debug console?

Steps to reproduce: Start debugging something, have the console be full of text. Hit Ctrl-F to find.

Can you search in VS Code terminal?

Press cmd + F / ctrl + F. Start typing.

How do I search for something in VS Code?

VS Code allows you to quickly search over all files in the currently opened folder. Press Ctrl+Shift+F and enter your search term. Search results are grouped into files containing the search term, with an indication of the hits in each file and its location.


1 Answers

Looks like this answer is now outdated, see the accepted one ☝️


A type-to-filter functionality has been added. To use it:

  1. Give focus to the debug console (By clicking it, for instance.)
  2. Press cmd + F / ctrl + F
  3. Start typing

You will see what you type in the upper right corner of the debug console.

The little text box that appears top right corner of the debug console

You can then "enable filter on type" (the 3 lines left of the 'x') and only matching lines will show in the debug console. Press Escape to clear the search.

So it's not exactly the search feature OP was looking for, plus you can't type spaces, but it's the best built in tool for now (July 2019).

like image 56
Félix Paradis Avatar answered Sep 22 '22 02:09

Félix Paradis