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

Extension stopped working on VisualStudio v17.3.0 #33

Open
Xyotic opened this issue Aug 10, 2022 · 10 comments
Open

Extension stopped working on VisualStudio v17.3.0 #33

Xyotic opened this issue Aug 10, 2022 · 10 comments
Assignees
Labels
bug Something isn't working

Comments

@Xyotic
Copy link

Xyotic commented Aug 10, 2022

I updated VisualStudip from 17.2.5 to 17.3.0 and the extension stopped working.
I did the update on two seperate machines to verify this issue.

When pressing "Play in Editor" nothing happens. Not even a error message or console log.

Works fine if I go back to 17.2.5.

@Xyotic Xyotic added the bug Something isn't working label Aug 10, 2022
@Commander-Firestrike
Copy link

I believe your issue is the same as mine - I assume it is since the problem I experienced appeared after updating VS2022 to 17.3.0 also. I did a lot of digging and a bit of messing around and I managed to get the extension working again, and I will attempt to explain how... but firstly we need to go over a bit of background.

The issue I was experiencing was an error appearing mentioning a "method not found" after trying to run and debug the project, similar to what you said about the "Play in Editor" button not working. I cloned the repo and built the extension myself in VS2022 to debug it.
I found that in the DebugLaunch method, the debugger session is created, and the constructor for GodotStartInfo was throwing the exception. It inherits the StartInfo type from the Mono.Debugging.VisualStudio namespace, which is from the package of the same name (<PackageReference Include="Mono.Debugging.VisualStudio" Version="16.1.3-pre" ExcludeAssets="runtime" /> in the .csproj)

I can't for the life of me find any reference to "Mono.Debugging.VisualStudio" anywhere else within Google's reach apart from this tangential mention on this stackoverflow thread.
Yet, the .dlls exist in the Xamarin extension folders of older Visual Studio versions. Changing the version in the csproj always gives an error saying the package cannot be found on nuget/myget.

Luckily, the extension also exists within the VS2022 installation folder. Updating the reference of Mono.Debugging.VisualStudio and adding references to the Mono.Debugging, and Mono.Debugging.Soft dlls in the [Program Files(might depend on where you installed VS)]\Microsoft Visual Studio\2022\Community\Common7\IDE\Extensions\Xamarin\Mono.Debugging\ directory and the extension works again! I have not done extensive testing but it looks like breakpoints work.

Now, ideally I would make a pull request, but have instead decided to document my findings here - because of my lack of understanding of the mysterious Mono.Debugging.VisualStudio package and where it comes from. I have no idea if it will work on other peoples' machines being packaged as a .vsix when the dlls are referenced by path instead of nuget packages.
It appears as if there is no way to reference the required dlls without referencing the files in the VS2022 installation folder. It looks like it is just part of the internal Visual Studio Xaramin functionality. I can't find any source, I can't find any documentation, and like I said I can't even find mentions of it online.

I'm not sure where to go from here, since lack of any info about the package prevents any kind of meaningful development.

@GeorgeS2019
Copy link

@Commander-Firestrike
Have you tried the latest PR e.g. 35 to check if this works with VS2022 and for the Godot4 dotnet6 merged

@GeorgeS2019
Copy link

Do we still need the StubProj project (the workaround to make the exension work

@Commander-Firestrike
Copy link

Commander-Firestrike commented Sep 1, 2022

Do we still need the StubProj project (the workaround to make the exension work

Currently I'm using my own build of the project with some slight edits I made to add a button in the toolbar to launch the debug session instead of relying on the StubProj method. I recommend checking out Jiiks' fork. which appears to fix the issue although I haven't tested it.

@Commander-Firestrike Have you tried the latest PR e.g. 35 to check if this works with VS2022 and for the Godot4 dotnet6 merged

Also I have not tried this yet, as Godot 4 will use dotnet 6 but this plugin uses the Mono debugger, so I am guessing the entire plugin will need to be rewritten.

@GeorgeS2019
Copy link

It launch Godot..in a more reliable way than the StudProj

I hope debugging is the next step

@Commander-Firestrike
Copy link

It launch Godot..in a more reliable way than the StudProj

I hope debugging is the next step

What do you mean by "it"? Are you referring to Jiiks' fork?

@GeorgeS2019
Copy link

YES!

@Commander-Firestrike
Copy link

Okay cool. I'll mess around some more to see if I can get breakpoints more reliable.

@Commander-Firestrike
Copy link

Alright cool. I might make some pull requests then.

instr3 added a commit to Alith-Game-Studio/godot-csharp-visualstudio that referenced this issue Mar 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants