Closed vchelaru closed 1 month ago
I found a workaround, not sure if this is the proper way to do it. I can wrap the Update method:
protected override void Update(GameTime gameTime)
{
try
{
GamePadState gamePadState = default;
try { gamePadState = GamePad.GetState(PlayerIndex.One); }
catch (NotImplementedException) { /* ignore gamePadState */ }
Microsoft.Xna.Framework.Input.GamePad.SetVibration(0, 1f, 1f);
}
catch (Exception e)
{
System.Console.WriteLine(e);
throw;
}
base.Update(gameTime);
}
This results in the callstack showing in the output window, which is a big improvement. Is this the best we can do?
I'm going to close this issue since there is a workaround here. Also, Visual Studio 17.11 seems to also have improved debugging of blazor wasm builds - I'm now getting callstacks and code breaking when I wasn't before with 17.10.
I'm not sure if this is a Kni issue but any advise would be much appreciated. If an exception is thrown, I do not see a callstack, either in Visual Studio or in the web console.
To reproduce, add the following code to a new kni project.
I realize that this is not currently implemented in Kni, that's why I'm intentionally using this function. When this occurs, I get the following:
The game screen turns purple instead of CornflowerBlue
Visual Studio does not hit a breakpoint - it shows the controls for a running app as if no exception has occurred
The browser console (CTRL+SHIFT+i) shows an exception but does not show a callstack
Visual Studio output window shows exceptions but does not show a callstack
This makes debugging very difficult. Is there a way to get a callstack? I'm not sure if I'm missing some setting in Visual Studio or in my project to break on exceptions or get callstacks.
What version of KNI does the bug occur on:
What operating system are you using:
What KNI platform are you using: