Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't found out keyword in java files by find in files menu #100373

Closed
whoopsplus opened this issue Jun 17, 2020 · 20 comments
Closed

Can't found out keyword in java files by find in files menu #100373

whoopsplus opened this issue Jun 17, 2020 · 20 comments
Assignees
Labels
info-needed Issue requires more information from poster

Comments

@whoopsplus
Copy link

Issue Type: Bug

  1. Open Vscode on windows10, the Vscode's version was 1.46.0(user setup).
  2. Open Android source code folder: frameworks/base/services by "open folders" menu.
  3. Search key word: BatterySaverPolicy in above folder by "search in files" menu, but the result show "No results found", and "Match case" & "Match whole word" options are no enable.
  4. Can found out the keyword by the command: grep "batterysaverpolicy" * -niR on linux OS under the same source code folder.

VS Code version: Code 1.46.0 (a5d1cc2, 2020-06-10T09:03:20.462Z)
OS version: Windows_NT x64 10.0.17763

System Info
Item Value
CPUs Intel(R) Core(TM) i5-9400 CPU @ 2.90GHz (6 x 2904)
GPU Status 2d_canvas: enabled
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
oop_rasterization: disabled_off
protected_video_decode: enabled
rasterization: enabled
skia_renderer: disabled_off_ok
video_decode: enabled
viz_display_compositor: enabled_on
viz_hit_test_surface_layer: disabled_off_ok
webgl: enabled
webgl2: enabled
Load (avg) undefined
Memory (System) 15.89GB (9.19GB free)
Process Argv
Screen Reader no
VM 0%
Extensions (8)
Extension Author (truncated) Version
java red 0.62.0
vscodeintellicode Vis 1.2.8
vscode-java-debug vsc 0.26.0
vscode-java-dependency vsc 0.10.2
vscode-java-pack vsc 0.9.1
vscode-java-test vsc 0.23.0
vscode-maven vsc 0.22.0
vim vsc 1.14.5
@whoopsplus
Copy link
Author

These are screenshot, for your information, thanks a lot~

1
2
3

@whoopsplus whoopsplus changed the title Can't found out keyword in java files by find in files mune Can't found out keyword in java files by find in files menu Jun 17, 2020
@gjsjohnmurray
Copy link
Contributor

Any difference if you uncheck this button?

image

@whoopsplus
Copy link
Author

whoopsplus commented Jun 17, 2020

Hi gjsjohnmurray,
The same result,
and ask my colleague to install Vscode to try, also encounter the same symptom.
Vscode can found out the keyword from the opened java file, but just can only found out from the currently opened file, can not found out the keyword from other java files which not been opened in edit windows.

4
5
6
7

@roblourens
Copy link
Member

Can you check the tips in https://github.com/microsoft/vscode/wiki/Search-Issues#missing-search-results?

Also what if you don't set ./core in "files to include"?

@roblourens roblourens added the info-needed Issue requires more information from poster label Jun 17, 2020
@whoopsplus
Copy link
Author

whoopsplus commented Jun 19, 2020

  1. I have disable all exclude function in user and Workspace setting menu as follows, but also show "No results found", are there some setting i still missing?
    9
    10
    11
    8

  2. Still show "No results found" after don't set ./core in "files to include",
    12
    13

  3. Can found out the keyword by the command: grep "batterysaverpolicy" * -niRo on linux under the same source code folder.
    14

@roblourens
Copy link
Member

Please do the following

  • Run the command "Set log level" and change it to "Trace"
  • Run the search again
  • Show the search-related messages in the "Log (Window)" output panel

image

@whoopsplus
Copy link
Author

whoopsplus commented Jul 6, 2020

+update

The log as following,

[2020-07-06 17:37:29.750] [renderer1] [trace] CommandService#executeCommand workbench.output.action.clearOutput
[2020-07-06 17:37:29.750] [renderer1] [trace] telemetry/workbenchActionExecuted {"id":"workbench.output.action.clearOutput","from":"contextMenu"}
[2020-07-06 17:37:32.097] [renderer1] [trace] SearchService#search {"_reason":"searchView","folderQueries":[{"folder":{"$mid":1,"fsPath":"z:\\PROJECTS\\CE9\\frameworks\\base\\services","_sep":1,"external":"file:///z%3A/PROJECTS/CE9/frameworks/base/services","path":"/z:/PROJECTS/CE9/frameworks/base/services","scheme":"file"},"excludePattern":{"**/.git":false,"**/.svn":false,"**/.hg":false,"**/CVS":false,"**/.DS_Store":false,"**/.classpath":false,"**/.factorypath":false,"**/.project":false,"**/.settings":false,"**/node_modules":false,"**/bower_components":false,"**/*.code-search":false},"fileEncoding":"utf8","disregardIgnoreFiles":true,"disregardGlobalIgnoreFiles":true,"ignoreSymlinks":false,"includePattern":{"core":true,"core/**":true}}],"usingSearchPaths":true,"maxResults":10000,"type":2,"contentPattern":{"pattern":"batterysaverpolicy","isRegExp":false,"isCaseSensitive":false,"isWordMatch":false,"wordSeparators":"`~!@#$%^&*()-=+[{]}\\|;:'\",.<>/?"},"previewOptions":{"matchLines":1,"charsPerLine":1000},"usePCRE2":false}
[2020-07-06 17:37:32.102] [renderer1] [debug] SearchService#search provideTextSearchResults batterysaverpolicy, {"folder":"file:///z%3A/PROJECTS/CE9/frameworks/base/services","excludes":[],"includes":["core","core/**"],"useIgnoreFiles":false,"useGlobalIgnoreFiles":false,"followSymlinks":true,"encoding":"utf8","maxFileSize":17179869184,"maxResults":10000,"previewOptions":{"matchLines":1,"charsPerLine":1000},"usePCRE2":false}
[2020-07-06 17:37:32.102] [renderer1] [trace] telemetry/searchResultsFirstRender {"duration":5}
[2020-07-06 17:37:32.102] [renderer1] [debug] SearchService#search rg --hidden --ignore-case -g '!*' -g '/core' -g '/core/**' --max-filesize '17179869184' --no-ignore --follow --crlf --fixed-strings --no-config --no-ignore-global --json -- 'batterysaverpolicy' '.'
 - cwd: z:\PROJECTS\CE9\frameworks\base\services
[2020-07-06 17:37:33.953] [renderer1] [debug] SearchService#search Got data from stdout
[2020-07-06 17:37:33.953] [renderer1] [debug] SearchService#search No result from parser
[2020-07-06 17:37:33.953] [renderer1] [trace] SearchService#search: 1853ms
[2020-07-06 17:37:33.953] [renderer1] [trace] telemetry/textSearchComplete {"reason":"searchView","workspaceFolderCount":1,"endToEndTime":1853,"scheme":"file","usePCRE2":false}
[2020-07-06 17:37:33.954] [renderer1] [trace] telemetry/searchResultsShown {"count":0,"fileCount":0,"options":{"isRegExp":false,"isCaseSensitive":false,"isWordMatch":false,"wordSeparators":"`~!@#$%^&*()-=+[{]}\\|;:'\",.<>/?"},"duration":1857,"scheme":"file","searchOnTypeEnabled":true}
[2020-07-06 17:37:33.954] [renderer1] [trace] telemetry/searchResultsFinished {"duration":1857}
[2020-07-06 17:38:06.328] [renderer1] [trace] CommandService#executeCommand editor.action.wordHighlight.trigger
[2020-07-06 17:38:06.329] [renderer1] [trace] telemetry/editorActionInvoked {"name":"Trigger Symbol Highlight","id":"editor.action.wordHighlight.trigger"}
[2020-07-06 17:38:06.437] [renderer1] [trace] CommandService#executeCommand editor.action.wordHighlight.trigger
[2020-07-06 17:38:06.437] [renderer1] [trace] telemetry/editorActionInvoked {"name":"Trigger Symbol Highlight","id":"editor.action.wordHighlight.trigger"}
[2020-07-06 17:38:06.500] [renderer1] [trace] CommandService#executeCommand editor.action.wordHighlight.trigger
[2020-07-06 17:38:06.501] [renderer1] [trace] telemetry/editorActionInvoked {"name":"Trigger Symbol Highlight","id":"editor.action.wordHighlight.trigger"}
[2020-07-06 17:38:06.523] [renderer1] [trace] CommandService#executeCommand setContext
[2020-07-06 17:38:06.525] [renderer1] [trace] CommandService#executeCommand editor.action.wordHighlight.trigger
[2020-07-06 17:38:06.525] [renderer1] [trace] telemetry/editorActionInvoked {"name":"Trigger Symbol Highlight","id":"editor.action.wordHighlight.trigger"}
[2020-07-06 17:38:06.549] [renderer1] [trace] CommandService#executeCommand editor.action.wordHighlight.trigger
[2020-07-06 17:38:06.550] [renderer1] [trace] telemetry/editorActionInvoked {"name":"Trigger Symbol Highlight","id":"editor.action.wordHighlight.trigger"}
[2020-07-06 17:38:06.586] [renderer1] [trace] CommandService#executeCommand editor.action.wordHighlight.trigger
[2020-07-06 17:38:06.586] [renderer1] [trace] telemetry/editorActionInvoked {"name":"Trigger Symbol Highlight","id":"editor.action.wordHighlight.trigger"}
[2020-07-06 17:38:06.622] [renderer1] [trace] CommandService#executeCommand editor.action.wordHighlight.trigger
[2020-07-06 17:38:06.622] [renderer1] [trace] telemetry/editorActionInvoked {"name":"Trigger Symbol Highlight","id":"editor.action.wordHighlight.trigger"}
[2020-07-06 17:38:06.655] [renderer1] [trace] CommandService#executeCommand editor.action.wordHighlight.trigger
[2020-07-06 17:38:06.655] [renderer1] [trace] telemetry/editorActionInvoked {"name":"Trigger Symbol Highlight","id":"editor.action.wordHighlight.trigger"}
[2020-07-06 17:38:06.689] [renderer1] [trace] CommandService#executeCommand editor.action.wordHighlight.trigger
[2020-07-06 17:38:06.689] [renderer1] [trace] telemetry/editorActionInvoked {"name":"Trigger Symbol Highlight","id":"editor.action.wordHighlight.trigger"}
[2020-07-06 17:38:09.402] [renderer1] [trace] CommandService#executeCommand setContext
[2020-07-06 17:38:09.403] [renderer1] [trace] CommandService#executeCommand editor.action.wordHighlight.trigger
[2020-07-06 17:38:09.403] [renderer1] [trace] telemetry/editorActionInvoked {"name":"Trigger Symbol Highlight","id":"editor.action.wordHighlight.trigger"}
[2020-07-06 17:38:13.430] [renderer1] [trace] CommandService#executeCommand extension.vim_ctrl+a
[2020-07-06 17:38:13.430] [renderer1] [trace] telemetry/workbenchActionExecuted {"id":"extension.vim_ctrl+a","from":"keybinding"}
[2020-07-06 17:38:13.441] [renderer1] [trace] CommandService#executeCommand editor.action.wordHighlight.trigger
[2020-07-06 17:38:13.441] [renderer1] [trace] telemetry/editorActionInvoked {"name":"Trigger Symbol Highlight","id":"editor.action.wordHighlight.trigger"}
[2020-07-06 17:38:18.139] [renderer1] [trace] CommandService#executeCommand editor.action.wordHighlight.trigger
[2020-07-06 17:38:18.139] [renderer1] [trace] telemetry/editorActionInvoked {"name":"Trigger Symbol Highlight","id":"editor.action.wordHighlight.trigger"}
[2020-07-06 17:38:18.211] [renderer1] [trace] CommandService#executeCommand setContext
[2020-07-06 17:38:18.212] [renderer1] [trace] CommandService#executeCommand editor.action.wordHighlight.trigger
[2020-07-06 17:38:18.212] [renderer1] [trace] telemetry/editorActionInvoked {"name":"Trigger Symbol Highlight","id":"editor.action.wordHighlight.trigger"}
[2020-07-06 17:38:18.235] [renderer1] [trace] CommandService#executeCommand editor.action.wordHighlight.trigger
[2020-07-06 17:38:18.236] [renderer1] [trace] telemetry/editorActionInvoked {"name":"Trigger Symbol Highlight","id":"editor.action.wordHighlight.trigger"}
[2020-07-06 17:38:18.281] [renderer1] [trace] CommandService#executeCommand editor.action.wordHighlight.trigger
[2020-07-06 17:38:18.281] [renderer1] [trace] telemetry/editorActionInvoked {"name":"Trigger Symbol Highlight","id":"editor.action.wordHighlight.trigger"}
[2020-07-06 17:38:18.314] [renderer1] [trace] CommandService#executeCommand editor.action.wordHighlight.trigger
[2020-07-06 17:38:18.314] [renderer1] [trace] telemetry/editorActionInvoked {"name":"Trigger Symbol Highlight","id":"editor.action.wordHighlight.trigger"}

@whoopsplus
Copy link
Author

whoopsplus commented Jul 6, 2020

+another output

[2020-07-06 17:51:13.513] [renderer1] [trace] CommandService#executeCommand workbench.output.action.clearOutput
[2020-07-06 17:51:13.514] [renderer1] [trace] telemetry/workbenchActionExecuted {"id":"workbench.output.action.clearOutput","from":"contextMenu"}
[2020-07-06 17:51:19.158] [renderer1] [trace] telemetry/workbenchActionExecuted {"id":"search.action.refreshSearchResults","from":"sideBar"}
[2020-07-06 17:51:19.191] [renderer1] [trace] SearchService#search {"_reason":"searchView","folderQueries":[{"folder":{"$mid":1,"fsPath":"z:\\PROJECTS\\CE9\\frameworks\\base\\services","_sep":1,"external":"file:///z%3A/PROJECTS/CE9/frameworks/base/services","path":"/z:/PROJECTS/CE9/frameworks/base/services","scheme":"file"},"fileEncoding":"utf8","disregardIgnoreFiles":true,"disregardGlobalIgnoreFiles":true,"ignoreSymlinks":false}],"usingSearchPaths":false,"maxResults":10000,"type":2,"contentPattern":{"pattern":"batterysaverpolicy","isRegExp":false,"isCaseSensitive":false,"isWordMatch":false,"wordSeparators":"`~!@#$%^&*()-=+[{]}\\|;:'\",.<>/?"},"previewOptions":{"matchLines":1,"charsPerLine":1000},"usePCRE2":false,"userDisabledExcludesAndIgnoreFiles":true}
[2020-07-06 17:51:19.196] [renderer1] [debug] SearchService#search provideTextSearchResults batterysaverpolicy, {"folder":"file:///z%3A/PROJECTS/CE9/frameworks/base/services","excludes":[],"includes":[],"useIgnoreFiles":false,"useGlobalIgnoreFiles":false,"followSymlinks":true,"encoding":"utf8","maxFileSize":17179869184,"maxResults":10000,"previewOptions":{"matchLines":1,"charsPerLine":1000},"usePCRE2":false}
[2020-07-06 17:51:19.196] [renderer1] [trace] telemetry/searchResultsFirstRender {"duration":5}
[2020-07-06 17:51:19.197] [renderer1] [debug] SearchService#search rg --hidden --ignore-case --max-filesize '17179869184' --no-ignore --follow --crlf --fixed-strings --no-config --no-ignore-global --json -- 'batterysaverpolicy' '.'
 - cwd: z:\PROJECTS\CE9\frameworks\base\services
[2020-07-06 17:51:26.049] [renderer1] [debug] SearchService#search Got data from stdout
[2020-07-06 17:51:26.050] [renderer1] [debug] SearchService#search No result from parser
[2020-07-06 17:51:26.050] [renderer1] [trace] SearchService#search: 6855ms
[2020-07-06 17:51:26.050] [renderer1] [trace] telemetry/textSearchComplete {"reason":"searchView","workspaceFolderCount":1,"endToEndTime":6855,"scheme":"file","usePCRE2":false}
[2020-07-06 17:51:26.051] [renderer1] [trace] telemetry/searchResultsShown {"count":0,"fileCount":0,"options":{"isRegExp":false,"isCaseSensitive":false,"isWordMatch":false,"wordSeparators":"`~!@#$%^&*()-=+[{]}\\|;:'\",.<>/?"},"duration":6859,"scheme":"file","searchOnTypeEnabled":true}
[2020-07-06 17:51:26.051] [renderer1] [trace] telemetry/searchResultsFinished {"duration":6860}
[2020-07-06 17:51:44.987] [renderer1] [trace] CommandService#executeCommand setContext
[2020-07-06 17:51:44.988] [renderer1] [trace] CommandService#executeCommand editor.action.wordHighlight.trigger
[2020-07-06 17:51:44.988] [renderer1] [trace] telemetry/editorActionInvoked {"name":"Trigger Symbol Highlight","id":"editor.action.wordHighlight.trigger"}
[2020-07-06 17:51:46.183] [renderer1] [trace] CommandService#executeCommand extension.vim_ctrl+a
[2020-07-06 17:51:46.184] [renderer1] [trace] telemetry/workbenchActionExecuted {"id":"extension.vim_ctrl+a","from":"keybinding"}
[2020-07-06 17:51:46.189] [renderer1] [trace] CommandService#executeCommand editor.action.wordHighlight.trigger
[2020-07-06 17:51:46.190] [renderer1] [trace] telemetry/editorActionInvoked {"name":"Trigger Symbol Highlight","id":"editor.action.wordHighlight.trigger"}
[2020-07-06 17:51:47.222] [renderer1] [trace] CommandService#executeCommand extension.vim_ctrl+a
[2020-07-06 17:51:47.223] [renderer1] [trace] telemetry/workbenchActionExecuted {"id":"extension.vim_ctrl+a","from":"keybinding"}
[2020-07-06 17:51:47.225] [renderer1] [trace] CommandService#executeCommand editor.action.wordHighlight.trigger
[2020-07-06 17:51:47.226] [renderer1] [trace] telemetry/editorActionInvoked {"name":"Trigger Symbol Highlight","id":"editor.action.wordHighlight.trigger"}
[2020-07-06 17:51:47.604] [renderer1] [trace] CommandService#executeCommand extension.vim_ctrl+a
[2020-07-06 17:51:47.604] [renderer1] [trace] telemetry/workbenchActionExecuted {"id":"extension.vim_ctrl+a","from":"keybinding"}
[2020-07-06 17:51:47.607] [renderer1] [trace] CommandService#executeCommand editor.action.wordHighlight.trigger

@roblourens
Copy link
Member

Are you able to get any search results, or is it just this one particular query that doesn't work?

@whoopsplus
Copy link
Author

not only just this one particular query that doesn't work, but also other keyword can't been found from *.java files,
but can found out the keyword when open the java file in edit windows as following.

捕获1
捕获2
捕获3
捕获4

@roblourens
Copy link
Member

Ok, it sounds like search is not working at all for you (when a file is open in the editor, then the editor searches that file, so it works differently).

Does file search work (ctrl+p)?

Also could you try running our search tool manually? Open a terminal in the folder with your code, and run "<vscode install directory>\resources\app\node_modules.asar.unpacked\vscode-ripgrep\bin\rg.exe" <search term>

where the install directory will be different based on where you have installed vscode.

@whoopsplus
Copy link
Author

whoopsplus commented Jul 13, 2020

+Update

Does file search work (ctrl+p)?
--- yes, it can work normally.

and rg.exe also can work,
捕获

It's so strange!!!
now Vscode also can work after i add rg.exe to windows's enviroment patch.
捕获3

@roblourens
Copy link
Member

windows's enviroment patch

Do you mean the PATH variable? Or something else?

@whoopsplus
Copy link
Author

Hi Roblourens:
Yes, my mean is the PATH variable.
捕获

roblourens added a commit that referenced this issue Jul 21, 2020
sbatten pushed a commit to sbatten/vscode that referenced this issue Jul 21, 2020
@roblourens
Copy link
Member

roblourens commented Jul 22, 2020

Very strange, thanks. I have updated our insiders build with some extra logging. Could you try installing it and checking the log again?

https://code.visualstudio.com/insiders

@whoopsplus
Copy link
Author

sure, and which version should been installed? System Installer version or User Installer version?

@roblourens
Copy link
Member

Either one.

@whoopsplus
Copy link
Author

whoopsplus commented Jul 31, 2020

+update

  1. The "Find in files" menu can work normally after install insiders user version.
  2. The "Find in files" function also can work normally now after install ** official released user version** again,
    even i don't add rg.exe to windows's PATH enviroment.
  3. Our source codes were all stored in remote server, and IT enginner cancle server's encryption strategy recently,
    then insiders user version and official released user version 's "Find in files" menu are both can work normally.

捕获

so, i think that this abnormally sympton maybe caused by our server's encryption strategy, rater than VS Code itself.

I will close this issues if no concern.

Thanks for your support!!!

@roblourens
Copy link
Member

Cool, I'm glad it works. So you reinstalled vscode stable, and now it works there?

our server's encryption strategy

Can you tell me more about that?

@whoopsplus
Copy link
Author

+Update

  1. So you reinstalled vscode stable, and now it works there?
    --- Yes, vscode stable version can work normally now, even i don't add rg.exe to windows's PATH enviroment.

捕获

  1. our server's encryption strategy, Can you tell me more about that?
    --- Our codebase were all stored in remote ubuntu server, and all servers were installed the third-party encryption software before as confidentiality requirement, and "Find in files" can't work.
    --- IT enginner uninstal the third-party encryption software recently as it has critical bug, now "Find in files" can work normally.

so, i suspect that this abnormally sympton was caused by the third-party encryption software‘s encryption strategies.

@github-actions github-actions bot locked and limited conversation to collaborators Sep 14, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
info-needed Issue requires more information from poster
Projects
None yet
Development

No branches or pull requests

3 participants