Page 1 of 1

Debug C# Code in Visual Studio 2017

Posted: Wed Apr 10, 2019 8:23 am
by bowlmaster
Is there a way to debug C# Code with CE 5.4 in Visual Studio 2017 ?

Re: Debug C# Code in Visual Studio 2017

Posted: Wed Apr 17, 2019 2:18 pm
by Cry-Flare
C# debugging was added in CRYENGINE 5.5 for Visual Studio 2017 only.
https://docs.cryengine.com/display/CEPR ... Studio2017

You will need to install the bundled Visual Studio Plugin located at "CRYENGINE\Tools\VisualStudioExtensions\CryEngine.Debugger.Mono_15.7_FIX.vsix".

Re: Debug C# Code in Visual Studio 2017

Posted: Tue Apr 23, 2019 7:48 am
by bowlmaster
C# debugging was added in CRYENGINE 5.5 for Visual Studio 2017 only.
https://docs.cryengine.com/display/CEPR ... Studio2017

You will need to install the bundled Visual Studio Plugin located at "CRYENGINE\Tools\VisualStudioExtensions\CryEngine.Debugger.Mono_15.7_FIX.vsix".
Is this only working with Cryengine 5.5?
Debugging in Cryengine 5.4 give me an Error.

Re: Debug C# Code in Visual Studio 2017

Posted: Tue Apr 23, 2019 12:57 pm
by Cry-Flare
Yes the Visual Studio plugin was added in 5.5. To debug C# in 5.4 you will need to use Xamarin.

Re: Debug C# Code in Visual Studio 2017

Posted: Wed Apr 24, 2019 1:57 am
by mikemcm
Just downloaded CryEngine 5.5.2. Using Visual Studio 2017 community. I installed the .vsix above and see CryEngine Mono Debugger in 'Extensions and Updates' under tools. Opened and tried all three c# templates. They each have References to CryEngine.Common, .Core and .Core.UI.

I want to set a breakpoint and see debugging work. When I have the editor or game running, I try to select 'Debug GameLauncher' or the other options. I get 'Unable to start debuging' The system cannot find the file specificed.

I I tried to attach directly to the sandbox exe. It attached but with the 'No symbols recognized' so no breakpoints. Is there maybe some other step?

Re: Debug C# Code in Visual Studio 2017

Posted: Fri May 24, 2019 8:58 am
by Cry-Flare
Hi there,

You can indeed debug C# in CRYENGINE 5.5.2 with Visual Studio 2017.
First you will want to create a template project via the launcher.
Then Generate a solution for the project by right-clicking the cryproject file and clicking Generate solution.
Once you open the project shortcut that was generated, build the project from the Build menu->Build solution.
Then you can choose "Debug Sandbox" from the debug drop down menu.
From here you can set breakpoints (for example, set a breakpoint on the RequestFire method in rifle.cs, then shoot in-game).

If you have further issues, please let us know.