I need to know if it is possible to search for a value in debugger in IntelliJ Idea.
Example: you have a huge object tree and you need to find string variable that is set to same particular value.
Is there any way to do that?
Expand this tree so that you see all those strings, and start typing what you search for. The speed search should do the rest. To get to the next/previous results press the down/up arrows respectively.
Sorry to disappoint you, I don't think that this option exists.
The quick search will only look for values in expanded objects.
You can use some other tool to create a memory dump of this object, and look for your data there.
In the "Find action ..." menu, you select "Fully expand tree node" or use Numpad *
Related
In Visual Studio 2019 I can use Find in Files to find some text in my code. Then I can use Edit.GoToNextLocation and Edit.GoToPrevLocation to move through the matches. (I have them mapped to Ctrl-N and Ctrl-Shift-N.) This allows me to jump from location to location and edit as necessary without having to use the mouse.
How can I do the same thing in IntelliJ IDEA?
There are many ways, I suggest you get familiar with "Action" shortcut (control+shift+A) and "type" what you want, see if there's an action and what shortcut (if any) it has.
For e.g.:
Get also familiar with "Bookmarks". (Control Tab, Double Shift are also good) Control-E (recent is nice) think all these you can "type" to search in them as well and narrow the results using fuzzy search (aka: type TM for "TimeManager" for example). You get the idea.
I think I found it!
IntelliJ IDEA appears to have a Next Occurrence command that does what I want.
It seems that to get a navigable list of found results, I need to do Find in Path... followed by Open in Find Window (Ctrl-Enter). Then Next Occurrence and Previous Occurrence (not to be confused with Move to Next Occurrence and Move to Previous Occurrence!) take me through the various places.
In IntelliJ IDEA it doesn't loop back to the first result like Visual Studio does, but I can live with that.
I do wish it would go straight to the Find Window instead of me having to tell it to.
I already tried using the symbol explorer in VSCode (CTRL+P then write #). It allows me to jump to data (because it's a method) but it won't jump to normal properties like "computed:" or "methods:"?
This would be useful when eg. I look at my component and think "Aha! I need to add a computed, so let's jump to computeds". I could just CTRL+F but this sometimes doesn't work if another variable or comment has 'computed' in its name
Currently, you can
use Ctrl+R to open Go To Symbol in Editor,
then enter some words like data, computed or methods and etc.,
then press Enter
The cursor would be moved to the selected symbol. Tested in Win10/v1.48.2
The easiest way how to do that is probably using Bookmarks extension.
I am using them and also I haven't find a better way how to solve same problem as you have.
Suppose this file tree. I'm searching for sass, and the first highlighted entry is .sass-cache. However, I want to navigate to _sass instead. Is there any shortcut to jump to the next/previous search result?
I know I could type _sass to make it more specific, but I'd still like to know a way to flip through search results if available.
It is surprisingly intuitive. Just use the arrow keys, Up or down to select the next or previous match
I'm working on a huge project that has thousands of TODO items. So when I go to the TODO tool window in IntelliJ IDEA it shows all of them. How can I search for a specific one?
If you want to define which TODOs should be found, you are able to set filter and patterns.
In TODO panel click on Filter TODO Items and select Edit Filters
Here you are able to set filters and patterns which should be used. More about that is on their site https://www.jetbrains.com/help/idea/2016.2/defining-todo-patterns-and-filters.html.
Keep in mind that after you define a new filter, Intellij will start with Indexing (long proccess for huge projects:( )
Also Intellij IDEA TODO tool lets you select from which part you want to see a TODOs (top bar on uploaded image) or you can simply show all TODOs and start typing (classic searching).
First, expand all the todos (view the side menu or by pressing CTRL+numpad +. Then just start typing, and IntelliJ will take you to the first place the string you searched for appears, be it a name of a folder, file or the text of the todo comment itself. Like any other search in IntelliJ, you can use the ↑ and ↓ keys to jump between items matching your search string.
If you are using a mac, keys ⌘6 (command key and number 6 key) will do the magic.
Press alt+6 to search *TODO* comment.
You might also want to view only the TODOs you have added in your current branch. You can use the Default Changelist tab for this:
The Scope Based tab also gives you some useful options for narrowing down the TODOs too:
This is not the exact answer to the given question, but it helped for me, so maybe it will also help someone else :)
What I haven't notice earlier is that TODO Tool Window/tab has some child tabs on the top. For me, the most usefull one, was the tab „Current file”. I was made aware of this feature after looking in official IDE documentation:
https://www.jetbrains.com/help/idea/todo-tool-window.html
LINQPad is great for quickly looking for results with its awesome "Dump" method.
However, when I am looking on a dictionary that holds an array (or an object), I see it like that:
To actually see the value in each row, I have to click "Value", which opens a new tab. I'd really like a way to see all the values expanded in one view.
Is that possible?
It is, but it requires some coding on your part.
You'll have to implement an extension for LINQPad, and in that extension implement the ICustomMemberProvider interface. You can just put this code right along in your assembly. If it is in the LINQPad namespace, LINQPad will pick it up and use it.
For more info, see the LINQPad FAQ at http://www.linqpad.net/FAQ.aspx
I found it what I was looking for. I had to switch to "Results to rich text" (CTRL+SHIFT+T). However, at that view I still couldn't see the values properly:
However, that turned out to be because I did .Dump(0) instead of just .Dump(). Wit that fixed, I was able to expand the dictionary and see the whole picture: