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

IntelliSense stops working with the debugging workaround #26

Open
parachutingturtle opened this issue Feb 6, 2022 · 5 comments
Open

Comments

@parachutingturtle
Copy link

parachutingturtle commented Feb 6, 2022

If I use this extension, debugging does not work. If I apply the stub project workaround, debugging works but IntelliSense completely stops working for that project. Deleting the StubProj and restarting VS solves that, but then of course debugging does not work.

Windows 10
Visual Studio 2022
Godot v3.4.2.stable.mono.official [45eaa2daf]
Godot C# extension for Visual Studio v2.0.0
To get the debugging working, I needed to use the stub project workaround here: https://gist.github.com/31/302bab2630ddf8d90ab4aec0d358b538

Initially everything worked fine, including IntelliSense.
Yesterday IntelliSense wasn't working at first, but then all I remember doing was restarting VS and it was working again.
Today it was not working at all, after multiple restarts.

To clarify, IntelliSense works correctly with any other VS project, just not with a Godot project. All the while debugging works fine, the "Play in editor" works fine, Godot types are recognized, there are no apparent errors. It's just the code completion that's missing, regardless of what member or type I use (I start typing the name of a variable I've defined, and nothing. I type "GD." and nothing. You get the idea.)

(Also, I noticed that after closing Visual Studio with the Godot project, devenv.exe keeps running (and the Visual Studio instance with the project name in its title keeps showing up among the background processes in task manager), until I kill it. I'm only noting this here because this also only happens with a Godot project, and only after the workaround is applied. It doesn't happen with any other Visual Studio project. So possibly the Godot extension is causing this.)

edit: I've just realized that some people have mentioned this problem in the comments under #10 already. Apparently only some of us have this problem, I wonder why...


reproducing:
create a new Godot project (in a custom location) called Test
create 3D scene
rename root node "Spatial" to "MainScene"
select MainScene and add a new C# script ("MainScene.cs")
verify that in editor settings, Mono external editor is set to Visual Studio
double click on MainScene.cs in Godot does nothing (devenv.exe is not running)
save scene
go to project in file manager
open sln file ("Test.sln") with VS2022
open MainScene.cs
in _Ready() method, start typing "GD.", IntelliSense is working fine
debugging does not work though, so perform steps of godot-3.2.3-VS-extension-workaround.md (via https://gist.github.com/31/302bab2630ddf8d90ab4aec0d358b538 )
(in the process of that workaround, we do need to close VS, it does in fact properly close this time, checked in task manager)
after those steps are done, open MainScene.cs
in _Ready() method, start typing "GD.", IntelliSense is NOT working.
close VS.
devenv.exe is still running
in task manager end task "Microsoft Visual Studio 2022"
open sln file ("Test.sln") with VS2022 again
IntelliSense is still not working
delete StubProj project
close VS
in task manager end task "Microsoft Visual Studio 2022"
delete StubProj folder from the project folder
open sln file ("Test.sln") with VS2022 yet again
IntelliSense IS working again. However, debugging is not.
close VS (VS does now properly close.)

@31
Copy link

31 commented Feb 27, 2022

This happens for me too in VS2022, on Godot 3.4.3.

I went through the steps again to make an updated guide (https://gist.github.com/31/01be8c34f3892505a12ed773de7b7a7d) but nothing changed, and I hit the same problem you did, immediately. Restarting VS didn't seem to fix it for me (even temporarily).

I don't see anyone in #10 saying that it does work for them in VS2022, so I'm not convinced it's working for anyone. I don't know how to properly debug it, and I don't use Visual Studio anymore, so I can't find the motivation to try to dig deeper. 😞 I tried devenv /log but nothing in the resulting log seemed related.

@gntrakas
Copy link

gntrakas commented Mar 9, 2022

It happens to me too, exactly the same. I had to uninstall the plugin, install the previous version on VS 2019 and debug from there.

@31
Copy link

31 commented May 25, 2022

I hope you don't mind @Atlinx -- I'm reposting your comment from https://gist.github.com/31/302bab2630ddf8d90ab4aec0d358b538?permalink_comment_id=4178016#gistcomment-4178016 so more people who may be interested can see it:

I've tried Visual Studio 2022 v17.2.1 and everything works 😃

VS 2022 v17.2 was released on May 10, so it's a newer one than what I'd tried, at least! 😄

@BlizzCrafter
Copy link

BlizzCrafter commented May 26, 2022

I can confirm that intellisense still stopps working on v17.2.1 and v17.2.2, like the op said. I just tried it.

Btw. I have the exact same problem as the op and I can reproduce every single step.
Intellisense instantly starts working again without the debugging workaround.

@spwilliams2002
Copy link

I'm also having this issue with Godot v3.4.4 and VS v17.2.6. There was a short period after I first installed the extension that intellisense would sporadically work but at this point it just doesn't at all. Disabling the extension fixes the problem, though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants