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

Find All References search (via Shift+F12) don't work? #2710

Closed
houlei1017 opened this issue Oct 25, 2018 · 6 comments
Closed

Find All References search (via Shift+F12) don't work? #2710

houlei1017 opened this issue Oct 25, 2018 · 6 comments

Comments

@houlei1017
Copy link

Find a variable or method, show no thing happen。
could you tell me why? wrong config or not suppert.

Describe the bug

  • OS and Version: MAC 10.13.6
  • VS Code Version: 1.28.2
  • C/C++ Extension Version: 0.19.0
@sean-mcmanus
Copy link
Collaborator

Find All References hasn't been released yet. We're currently working on it -- #15 .

@sean-mcmanus
Copy link
Collaborator

Find All References is available in 0.25.0-insiders: https://github.com/microsoft/vscode-cpptools/releases/tag/0.25.0-insiders , but you'll need to set the C_Cpp.experimentalFeatures setting to "Enabled".

@markhu
Copy link

markhu commented Oct 5, 2019

Find All References seems a little flaky in 2019... at least it doesn't seem to work as well as Go To Definition. My fingers are becoming gnarled into the position to quickly CTRL-SHIFT-F to find in files, which is pretty much the same thing. 😅

Possibly related to

Visual Studio Code

Version: 1.38.1
Commit: b37e54c98e1a74ba89e03073e5a3761284e3ffb0
Date: 2019-09-11T13:31:32.854Z
Electron: 4.2.10
Chrome: 69.0.3497.128
Node.js: 10.11.0
V8: 6.9.427.31-electron.0
OS: Darwin x64 17.7.0

@sean-mcmanus
Copy link
Collaborator

@markhu We've fixed some Find All References bugs with 0.26.0-insiders2 (it has crashes with nested namespaces though (e.g. namepsace a::b {}), so you'd want to avoid using the insiders if your code uses nested namespaces). If you have more repro details on what case is failing we can look into fixing it.

@kkaja123
Copy link

Does the following dump help at all? (v0.26.1)

Unfortunately, I don't know exactly what caused the below error. I saw it show up pretty quickly after clicking Find All References. I know that the extension showed the pop-up saying that it was "confirming" files and that I could click on the magnifying glass to preview the results. I let it continue to completion, but nothing popped up in the side bar titled "REFERENCES: RESULTS." The busy icon is still displayed in that side bar and there isn't a magnifying glass in the status bar anymore. Additionally, next to the magnifying glass, there was an icon that said that several files were being parsed. The weird thing is that it said "0/920000" (or some large number like that). I'm pretty sure I don't have that many files. I blinked and that icon disappeared, so I don't know if that had anything to do with the problem.

[2019-11-19 16:29:10.139] [renderer1] [error] Cannot read property 'show' of undefined: TypeError: Cannot read property 'show' of undefined
	at ReferencesManager.closeRenameUI (C:\Users\Kyle.Kaja\.vscode\extensions\ms-vscode.cpptools-0.26.1\dist\main.js:7999:25)
	at module.exports.constructor.queueBlockingTask.languageClient.onReady.then.provideReferences.Promise (C:\Users\Kyle.Kaja\.vscode\extensions\ms-vscode.cpptools-0.26.1\dist\main.js:33372:64)
	at new Promise (<anonymous>)
	at FindAllReferencesProvider.<anonymous> (C:\Users\Kyle.Kaja\.vscode\extensions\ms-vscode.cpptools-0.26.1\dist\main.js:33295:36)
	at Generator.next (<anonymous>)
	at module.exports.__awaiter (C:\Users\Kyle.Kaja\.vscode\extensions\ms-vscode.cpptools-0.26.1\dist\main.js:33038:71)
	at new Promise (<anonymous>)
	at module.exports.__awaiter (C:\Users\Kyle.Kaja\.vscode\extensions\ms-vscode.cpptools-0.26.1\dist\main.js:33034:12)
	at FindAllReferencesProvider.provideReferences (C:\Users\Kyle.Kaja\.vscode\extensions\ms-vscode.cpptools-0.26.1\dist\main.js:33294:32)
	at define.provideReferences.a.asPromise (c:\Users\Kyle.Kaja\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:587:246)
	at t.asPromise.Promise (c:\Users\Kyle.Kaja\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:49:430)
	at new Promise (<anonymous>)
	at Object.t.asPromise (c:\Users\Kyle.Kaja\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:49:402)
	at k.provideReferences (c:\Users\Kyle.Kaja\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:587:217)
	at define.$provideReferences._withAdapter.e (c:\Users\Kyle.Kaja\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:603:809)
	at B._withAdapter (c:\Users\Kyle.Kaja\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:599:159)
	at B.$provideReferences (c:\Users\Kyle.Kaja\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:603:787)
	at d._doInvokeHandler (c:\Users\Kyle.Kaja\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:622:11)
	at d._invokeHandler (c:\Users\Kyle.Kaja\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:621:716)
	at d._receiveRequest (c:\Users\Kyle.Kaja\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:620:341)
	at d._receiveOneMessage (c:\Users\Kyle.Kaja\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:619:141)
	at define.constructor._protocol.onMessage.e (c:\Users\Kyle.Kaja\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:617:400)
	at u.fire (c:\Users\Kyle.Kaja\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:44:708)
	at e (c:\Users\Kyle.Kaja\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:40:460)
	at u.fire (c:\Users\Kyle.Kaja\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:44:708)
	at a (c:\Users\Kyle.Kaja\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:172:467)
	at e (c:\Users\Kyle.Kaja\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:172:513)
	at u.fire (c:\Users\Kyle.Kaja\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:44:708)
	at y._receiveMessage (c:\Users\Kyle.Kaja\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:181:276)
	at define.constructor._socketDisposables.push._socketReader.onMessage.e (c:\Users\Kyle.Kaja\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:178:415)
	at u.fire (c:\Users\Kyle.Kaja\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:44:708)
	at f.acceptChunk (c:\Users\Kyle.Kaja\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:175:35)
	at define.constructor._register._socket.onData.e (c:\Users\Kyle.Kaja\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:174:410)
	at Socket.t (c:\Users\Kyle.Kaja\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:182:689)
	at Socket.emit (events.js:182:13)
	at addChunk (_stream_readable.js:279:12)
	at readableAddChunk (_stream_readable.js:264:11)
	at Socket.Readable.push (_stream_readable.js:219:10)
	at Pipe.onread (net.js:636:20)

The code in my workspace is fairly complicated, so it'd be hard to determine the reproduction steps.

@sean-mcmanus
Copy link
Collaborator

@kkaja123 Thanks for reporting that -- we have PR that potentially fixes it at #4640 .

@github-actions github-actions bot locked and limited conversation to collaborators Oct 13, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants