VS Code - WSL - Go To Definition not working

Viewed 1483

Pressing F12 to Go To Definition in VS Code is not working for me with WSL extension.

I verified F12 was being recognized by turning on Screencast Mode, and that WSL is causing the Go To Definition issue by uninstalling the WSL extension and trying F12 in another project.

Is there any other information I can provide? This was working for me a few days ago and nothing changed that I know of. I tried older versions of WSL extension and was not able to get Go To Definition to work.

Thank you!

2 Answers

I'am using VsCode with WSL extension for C# project and the next thing helped me. It looks like you have to install extensions for each language again in 'wsl version of vsCode'. Once you open project go to ExtensionManager and try to install adequate extension (in my case for C# that was omnisharp), instead regular install button there should be 'Install in WSL:ubuntu' button. Once installation is completed restart VsCode and it should/may work.

I noticed that the terminal was stuck in "starting..." state. I think I was able to resolve this issue by installing the "Terminal Here" WSL extension.

Related