Step through MonoGame source code - c#

Is there a way to step through MonoGame source code while debugging (like with the .NET Framework) without having to compile MonoGame myself? I am using Visual Studio 2013.

No. Visual Studio requires a successful compilation to enable stepping through code.

Related

Why does this code crash Visual Studio 2015?

For some reason, even so much as typing this into a C# file in Visual Studio is enough to cause it to instantly crash. Why?
unsafe struct node {
node*[] child;
}
It seems to occur when the IDE would start coloring keywords and the like.
Trying it in TIO spits out csc.exe exited with code 1 which isn't very helpful.
While array declarations in C# are different than in C/C++, the above seems like it should be perfectly valid. Why isn't it, and why does it crash Visual Studio?
My Visual Studio version is 14.0.23107.
This is a known bug in Roslyn. This bug will affect any version of Visual Studio that uses Roslyn.
If I am interpreting VersionOf.net correctly, the first version of Visual Studio with Roslyn built-in is 2015. Before then, I think it was available only as an extension. So, Visual Studio 2013 and prior should be unaffected.
It's due to be fixed in the milestone 16 release. At this time, that release is not scheduled.
Because this is a bug in Roslyn, you can "get around" it by editing and compiling the code containing the unsafe struct in an older version of Visual Studio, one that predates Roslyn. Visual Studio 2012 should work. You can then use the resultant .DLL in your current software.
An unverified fix is available if you build Roslyn yourself from this branch. The fix was made in this commit.

How can I step through the Xamarin.Android source code in VS2015?

I am working on a cross platform project using Xamarin in Visual Studio 2015 Professional. I am facing a NotSupportedException and I can see the corresponding line of source code on GitHub.
However I need to fully understand what is going on there, so my question is: How can I step through the Xamarin.Android (aka Mono.Android) source code inside Visual Studio 2015?
To further explain the issue: I see the "Frame not in module" message in VS if I break at the point where the exception is thrown. Visual Studio offers me to view the disassembly, which I would rather not like to see...
Also it is not enough just to see the callstack. I need to know what parameters are being passed.

What options do I have for implementing custom code issues and fixes in Visual Studio 2012 and above?

I have experimented with implemented Roslyn Code Issues and Fixes in Visual Studio 2013 when they discussed it in BUILD 2014.
We want to be able to right custom rules that will cause either compiler errors or warning and additionally if possible give visual feedback in Visual Studio.
If possible, it would be nice to provide this in VS2012 and later, but the last time I checked, the ability to do this through Roslyn was in 2013 and later.
I do not have any specific attachment to Roslyn, but I am not aware of the ability to do this elsewhere.
Is there any other way to provide custom code issues and fixes int he IDE, or is it only through Roslyn in 2013?
You can only do this using Roslyn on Visual Studio 2015.
The Roslyn End User Preview for 2013 is a much older version of the APIs and is not supported.

What parts of Roslyn can you use with VS 2013?

I want to build a C# app that uses the Roslyn NuGet packages. I have Visual Studio 2013. Things were going fine until I hit a ReflectionTypeLoadException looking for Microsoft.Build version 14, which I take it comes with VS 2015 CTP (see this question).
My question is, how far can you get with Roslyn without running into this issue? Do you just need to avoid using the MSBuildWorkspace class? What are the alternatives? Is it possible to download and use the Microsoft.Build assembly from 2015 while still using the 2013 IDE?
You need to download the MSBuild 14 tools from http://go.microsoft.com/?linkid=9863815

Debugging Native code in Visual Studio Proff

The Solution that we work on here includes 1 project in C# and another project in C. Is there any way to debug c code in Visual Studio?
Of course, if you have the source code, create a project from it, compile as debug (add breakpoints, watches...) and do the debugging.

Categories