Comments (10)
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.
from godot-csharp-visualstudio.
@Commander-Firestrike
Have you tried the latest PR e.g. 35 to check if this works with VS2022 and for the Godot4 dotnet6 merged
from godot-csharp-visualstudio.
Do we still need the StubProj project (the workaround to make the exension work
from godot-csharp-visualstudio.
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.
from godot-csharp-visualstudio.
It launch Godot..in a more reliable way than the StudProj
I hope debugging is the next step
from godot-csharp-visualstudio.
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?
from godot-csharp-visualstudio.
YES!
from godot-csharp-visualstudio.
Okay cool. I'll mess around some more to see if I can get breakpoints more reliable.
from godot-csharp-visualstudio.
I assume this is Jiiks's plan
from godot-csharp-visualstudio.
Alright cool. I might make some pull requests then.
from godot-csharp-visualstudio.
Related Issues (20)
- Exception with Xamarin.VisualStudio "file already exists" HOT 5
- IntelliSense stops working with the debugging workaround HOT 5
- Can not launch game from Visual Studio 2022 HOT 12
- Cannot install it for visual studio 2022 HOT 2
- Cannot break in referenced projects.
- How to improve VisualStudio experience with Godot4 NativeAOT? HOT 4
- Latest Update from the submitted PRs HOT 33
- Where is the official "how to install" documentation? HOT 1
- Is this Obsolete? VS2022 works with Godot 4.Beta1 no extension needed HOT 8
- Make the launching easier HOT 1
- New launch workaround HOT 3
- Implement Input map suggestion
- adding PathMap to csproj breaks debugger
- [WIP] Godot4 Visual Studio 2022 Guide HOT 7
- [WIP] Re-design Godot 4 VS2022 Extension HOT 4
- [WIP] Hot Reload
- Support for Profiling? HOT 2
- Game changing framework for Godot 4 Visual Studio: VS2022 compatible test adaptor framework HOT 13
- Godot 4 addon for supporting debug in VS2022
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from godot-csharp-visualstudio.