Vscode: Debug Console should support find

Created on 16 Mar 2016  路  36Comments  路  Source: microsoft/vscode

  • VSCode Version: 0.10.10
  • OS Version: Ubuntu 14.04

This goes along with a few other debug console feature requests that I see (ex: #3974), but it would also be nice if find worked in the debug console.

Steps to reproduce:

  1. Start debugging something, have the console be full of text
  2. Hit Ctrl-F to find

Result: Find works in the editor window instead of the debug console

debug debug-console feature-request

Most helpful comment

Is there any status on this? It seems like a really basic feature. Every other editor in existence has it I think. There is even search in the terminal, which I'd think would be harder to implement.

All 36 comments

The Ctrl+A also selects all text on the editor windows instead of the debug console.

Is there any status on this? It seems like a really basic feature. Every other editor in existence has it I think. There is even search in the terminal, which I'd think would be harder to implement.

Can we get this please? VSCode is brilliant, but debugging in-editor is 1/10 for this lack of select all and/or find in debug console

@kevinsalerno You can use Select All. Right click and pick "Copy All". However, you still can't use Ctrl+A.

But even if you right click copy all you will be missing the lines (ie. main.js:323)

Big up for this, having to search through debug logs requires manual copy/pasting right now, not very optimal...

@ncannasse Exactly my experience. In my project I have a lot of debug logs...

Hi, definitely need this added to help with many development tasks.

Would like this too. I know some people redirect their debug output to the terminal and work there, but I don't like doing this. I prefer to keep my debug console for my debugging and my terminal for my terminal stuff. Would like to see Find support in the debug console.

@welkie redirecting the debug output to the terminal sounds like the way to go for now.
Any tip on how to do that?

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

This is honestly essential, idk why it's not implemented yet

I'd like to add this as the only feature I've ever requested because it's frankly bizarre that it's not there, it's one of those basic things, not a fancy thing, I think.

@snapcorp I bet the reason it hasn't been implemented yet is because a lot of the developers I encounter set the debugger to output into the integrated terminal instead. I seem to be the only one I know who chooses to keep it in the internal console. This is probably a Node dev thing, because the popular logging libraries choose to log to stdout instead of the console (which is a good idea of course, it's more performant), but VS Code by default will only show console output in the internal console.

This function is desperately needed, can't believe it's not been considered...Or is there any way to redirect DEBUG CONSOLE to OUTPUT tab?
@welkie thanks but when I try adding "console": "integratedTerminal" into launch.json it said this field is not allowed

After adding support for multiple debug consoles, this is the only step that is missing for me to switch to "Debug Console" instead of "Integrated Terminal"

I like vscode to the point that I'm using it for spring boot application instead of java IDEs. But this feature is really essential !

From tomorrow's vscode insider the debug console supports highlighting and filtering (just like the explorer for example).
So just click on the debug console and start typing and the matches will get highlighted / filtered.

This is not the exact find behavior, but I believe is a very nice workaround.
Try it out and let us know how it feels.

One of next milestones (probably march) I plan to add a filter functionality to the debug console.
It would behave very similarly to the PROBLEMS view filter. So try that one out and please raise concerns if you have any with regards to taking that approach

@sandy081 it would be cool if I could reuse some code from the PROBLEMS view. If the input box is complex we could potentially turn it into a filter widget or something. Can you also give me some pointers?

Here is the filter action item I used in Problems view.

https://github.com/Microsoft/vscode/blob/master/src/vs/workbench/contrib/markers/electron-browser/markersPanelActions.ts#L118

Take a look and I am open to suggestions. We can also discuss about your requirements and can come up with a common widget.

@isidorn type-to-filter works ok, but it's completely undiscoverable. Just some feedback about that functionality.

Has the type-to-filter functionality been removed?
Clicking on the debug console does not trigger type-to-filter anymore.

Based on feedback from here https://github.com/microsoft/vscode/issues/68793
We have gone back to the old behavior of clicking anywhere focusing the debug console input.
To focus the tree and type-to-filter we have introduced a new command (ctrl/cmd + F). So you have to press ctrl/cmd + F before filtering.
I should have mentined that in the release notes, but I forgot, sorry.

This is nice. I agree that it is not exactly discoverable but then that is true of a lot of VS code and it keeps the UI clean.

Is it intentional that the input does not support spaces? I can filter on "foo" but not on "foo bar". I can't understand why this limitation has been made.

@GraemeAllanBryce I think it would be a problem to use space because it's already used to expand nodes in the tree. To see this print a complex object to the console, than expand it using space.

@isidorn should we consider a find option, instead of or beside a filter?
I think that lots of time you want to see the context of the log i.e. what was logged just before or just after. This is only possible with find. Also this the original issue is about find - so it seems like lots of people wanted find behaviour.

@YisraelV I do agree that find is the ultimate goal here, however since the Tree already supports the filter that might be a "low hanging fruit" solution.
For the find there is more work to be done, but yes that would be the good solution.
As for reusing the find widget, could you please give some pointers since I know you use it in the terminal @Tyriar @rebornix

@YisraelV after discussing this in the standup we feel like the best first approach is to go with the filter. And try adding an input box similar to something what the problem panel has.
You can open a PR, so we start the discussion there on the potential implementation. Thanks!

@isidorn the terminal and webview use SimpleFindWidget, they both sub-class it as TerminalFindWidget and WebviewFindWidget. The debug console might be able to use the editor's find widget more easily though since it's a monaco instance @rebornix

@Tyriar the debug console is actually not a monaco instance, it is a tree underneath.

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

Thanks.

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

Thanks.

however integratedTerminal doesn't work in conjunction with ServerReadyAction in launch.json even with insider edition even seems it should.

// Enable launching a web browser when ASP.NET Core starts. For more information: https://aka.ms/VSCode-CS-LaunchJson-WebBrowser
"serverReadyAction": {                
  "action": "debugWithChrome",                                
  "pattern": "^\\s*Now listening on:\\s+(https?://\\S+)"
},

Any update on this? I was able to use "console": "terminal", on the debugger, however, it stopped working about a month or so ago. (integratedTerminal gets type-checked by VSCode telling me it isn't an option, btw). If anyone knows of any ways to quickly search debug output with the current setup I would love to hear it. I was copy/pasting console output into Sublime Text, until I found this:
https://stackoverflow.com/questions/51268169/how-to-search-the-debug-console-in-vscode
(this is still very far from ideal, as you can't copy/paste or use spaces)

Maybe I'm missing something?

I am wondering that too. After a long time away from VSCODE I tried it again (for a week now doing my complete project work) and besides that multiple windows are still not fully supported (sucks) filtering in the debug console falls under deal-breaker for me. I also could not find an extension to add that functionality. Do I miss something ??? That can not be true...

This is open longer than 4 years! Happy Anniversary.

I am using Flutter btw. I guess back to Android Studio

I need "find" not "filter". I want to see the context of the keyword, not the keyword itself!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

borekb picture borekb  路  3Comments

trstringer picture trstringer  路  3Comments

biij5698 picture biij5698  路  3Comments

philipgiuliani picture philipgiuliani  路  3Comments

mrkiley picture mrkiley  路  3Comments