If I right click, "Go to definition" is no long in the context menu. However, if I switch back to Intelliphense, it's there. It was working fine yesterday, then I updated vs code this morning, and now it is missing.
Go To Definition missing after updating to latest vs code version
Not sure why, I have all the options there:
VS Code: 1.96.0
PHP Tools: 1.54.16495
Weird.
VS Code: 1.96.0
PHP Tools: 1.54.16480
You're on a slightly newer version of the PHP Tools, but I wouldn't think it's a big enough jump to make the difference. And my version is from yesterday so it's pretty new.
I wonder what the issue is then... Especially since the menu item is showing up with different intellisense tools
Oh. Looks like maybe that slight version bump is the difference maker.
I uninstalled PHP Tools and reinstalled. Still didn't see "Go to definition" in the context menu. Then clicked "Switch to pre-release version" on the extension details page, and now I see "Go to definition" in the context menu. I switched back to release and the context menu option was gone again. So there must have been a change that fixes it.
AndyGiroux Thank you for the update. It's weird indeed - we did not change anything related to this functionality. We don't even add this functionality as it is the default command in VSCode.
May I ask you to check the log in "Help" -> Toggle Developer Tools -> Console.
There might be some (red) errors with more clues.
- Edited
Fun stuff. The wonders of software development lol
But yeah, no problem. The errors that I'm not seeing with the pre-release version are:
ERR [Extension Host] Error: Unexpected SIGPIPE
at process.<anonymous> (file:///Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/bootstrap-fork.js:3:11831)
at process.emit (node:events:518:28)
console.ts:137 [Extension Host] Error: Unexpected SIGPIPE
at process.<anonymous> (file:///Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/bootstrap-fork.js:3:11831)
at process.emit (node:events:518:28)
[DEVSENSE.phptools-vscode]Cannot call write after a stream was destroyed
$onExtensionRuntimeError @ mainThreadExtensionService.ts:78
S @ rpcProtocol.ts:458
Q @ rpcProtocol.ts:443
M @ rpcProtocol.ts:373
L @ rpcProtocol.ts:299
(anonymous) @ rpcProtocol.ts:161
B @ event.ts:1243
fire @ event.ts:1274
fire @ ipc.net.ts:652
l.onmessage @ localProcessExtensionHost.ts:378
mainThreadExtensionService.ts:79 Error: Cannot call write after a stream was destroyed
at _write (node:internal/streams/writable:491:11)
at Socket.Writable.write (node:internal/streams/writable:510:10)
at /Users/agiroux/.vscode/extensions/devsense.phptools-vscode-1.54.16480-darwin-arm64/out/src/extension.js:74:3107
at new Promise (<anonymous>)
at XR.write (/Users/agiroux/.vscode/extensions/devsense.phptools-vscode-1.54.16480-darwin-arm64/out/src/extension.js:74:3028)
at Vg.doWrite (/Users/agiroux/.vscode/extensions/devsense.phptools-vscode-1.54.16480-darwin-arm64/out/src/extension.js:75:1691)
at /Users/agiroux/.vscode/extensions/devsense.phptools-vscode-1.54.16480-darwin-arm64/out/src/extension.js:75:1590
at runNextTicks (node:internal/process/task_queues:60:5)
at processImmediate (node:internal/timers:454:9)
AndyGiroux Thank you. Those are new to me, but should not cause missing "Go To Definition" command.
If you use the shortcut F12
, does it work?
I think what's happening is that for some reason that version may not be properly booting up. I say that because if I "restart extensions" and then quickly try to check the context menu even with the pre-release version, it's not there, but if I give it a few more seconds, it shows up.
And I just noticed this error:
[Error - 6:21:43 PM] Connection to server is erroring. Shutting down server.
And just noticed these new errors in the dev tools console:
mainThreadExtensionService.ts:78 [DEVSENSE.phptools-vscode]Cannot call write after a stream was destroyed
$onExtensionRuntimeError @ mainThreadExtensionService.ts:78
mainThreadExtensionService.ts:79 Error: Cannot call write after a stream was destroyed
at _write (node:internal/streams/writable:491:11)
at Socket.Writable.write (node:internal/streams/writable:510:10)
at /Users/agiroux/.vscode/extensions/devsense.phptools-vscode-1.54.16480-darwin-arm64/out/src/extension.js:74:3107
at new Promise (<anonymous>)
at XR.write (/Users/agiroux/.vscode/extensions/devsense.phptools-vscode-1.54.16480-darwin-arm64/out/src/extension.js:74:3028)
at Vg.doWrite (/Users/agiroux/.vscode/extensions/devsense.phptools-vscode-1.54.16480-darwin-arm64/out/src/extension.js:75:1691)
at /Users/agiroux/.vscode/extensions/devsense.phptools-vscode-1.54.16480-darwin-arm64/out/src/extension.js:75:1590
As for F12, it works on the pre-release version, but not the release version.
AndyGiroux And is there an error when the extension loads normally? If the extension does not get loaded properly, a lot of functionality might be unavailable.