WebStorm "find in path" is bugged

Hello,

Something is weird with the "Find in path..." function. I have a function in a class called "isAdmin". And I use it several times in my project folder. When I search for "isAdmin" or "isAdmin(" it doesn't find anything.

 

My folder structure looks like

app
- platform
- common
- routes

However this behavior isn't permanent.

Are there any other people here who discovered this bug also?

1
7 comments

Hi there,

1) It's possible that you might be using different/wrong context/scope (so IDE does not search in those files). Would be good if you could illustrate it somehow (screenshots that would show Find in the Path window + project structure

2) In such "I'm 100% sure it should be working but somehow it does not" or "it worked fine yesterday/an hour ago" -- try "File | Invalidate Caches..." and restart IDE.

1
Avatar
Permanently deleted user

try "File | Invalidate Caches..." and restart IDE.

That was the solution thanks.

0
Avatar
Permanently deleted user

I am getting erratic behaviour from Find in Path. It appears to be missing certain occurences that I know are there. so basically Find in Path is erratic / flaky.

I did try the File Invalidate Caches, and restart IDE, but it still fails to find the string. 

0

@Mickeypuri

Please state your IDE version and provide details about your setup/settings (screenshots). Like: what kind of text you are looking for; how do you search (plain match or regex); is that file is part of some library or "normal" project file; what is the scope used; if you search for some another text (e.g. make up some unique even random string) -- will it find it in THAT file or not etc etc.

You can also place that file into brand new empty project and see if it will find the same text there.

Right now IDE may simply be omitting that file from search (e.g. because it does not satisfy currently selected scope) -- there is no way to tell what exactly is going on without seeing many details.

Invalidating caches is the basic advice that helps in most "used to work yesterday and now it broke" situations (especially after IDE update or crash) but will not help if it's some sort of "misconfiguration" case.

0
Avatar
Permanently deleted user

@andriyBazanov I am using Webstorm 2017.2.0, on Windows 7, 64Bit.

I was doing a basic text search, nothing special, not specifying words only, not specifying case sensitive, not regex, and was not specifying any file type, ie a totally open search. Yet if failed to find properly. I'm a developer, obviously I get that if I search for files with particular file type then it will exclude other files from the search, but I was not specifying any file type ie keeping it completely open.

It found some but missed many others. The file is part of the project, and in fact was in the same folder in which I had opened another file and then double clicking on a string in that file to find its occurences.

I also checked the scope, and did a search with a scope of all selected. Still it missed many occurences.

I then upgraded to 2017.4.0 and then bingo, it found 103 occurences.

Basically I can only come to conculsion that there was some kind of bug with the way that Find All is working. Upgrading seems to have fixed it. Although from a post I did, it seems others are still having a problem even with the 2017.4 build but on different OS.

I don't get why I would have any configuration needed for a basic Search in All Files functionality. this is basic functionality.

0
Avatar
Permanently deleted user

I suspect this is more widely buggy, but people may not always realise it as they expect such basic stuff to work properly and so it may be letting bugs in silently

0

>I don't get why I would have any configuration needed for a basic Search in All Files functionality. this is basic functionality.

By "misconfiguration" I meant searching in some scope when the file in question may not be included (due to whatever reason) or stuff like that.

P.S. I personally did not have any issues with search -- quite possibly my projects are too simple / have basic stuff only

 

I have seen one or two tickets on Issue Tracker with similar "Search cannot find all text occurrences" issues ... but nothing concrete was made of them IIRC (either person who reported it cannot reproduce it few days later .. or it's not reproducible on another computer) ... so no idea what exactly may have caused your case here.

P.P.S. There is no 2017.4 version (and unlikely to ever be) as it's only 3 major releases per year and 2017.3 is still only in development :)

0

Please sign in to leave a comment.