I am running VS 2017 on Win10 with Monogame 3.7.
I can use break points fine almost anywhere in my game except in a particular piece of code where if I am using a breakpoint both VS and the game window hang and I need to kill the game process to get VS to respond again. Anywhere else is fine.
This is in one of my scene’s update loop
public override void Update(GameTime gameTime)
{
if (mouseInputManager.LeftButtonReleased)
{
PathFinder pathfinder = new PathFinder(pathFindingWeightedGraph);
IPathFindingLocation target = pathFindingWeightedGraph.GetPathFindingLocationAtScenePosition(mouseInputManager.Position);
//Camera.GetSceneRelativePositionFromCameraRelativePosition(mouseInputManager.Position));
IPathFindingLocation start = pathFindingWeightedGraph.GetPathFindingLocationAtScenePosition(
((TransformComponent)EntityManager.GetComponentForEntity("prototypeCrewMember", "Transform")).SceneRelativePosition);
Debug.WriteLine("Target : " + target.ScenePosition);
Debug.WriteLine("Start : " + start.ScenePosition);
generalDebugUIWidget.AddColorBlockToDraw(target.ScenePosition, new Vector2(15, 15), Color.Black);
generalDebugUIWidget.AddColorBlockToDraw(start.ScenePosition, new Vector2(15, 15), Color.Black);
}
base.Update(gameTime);
}
If I put a breakpoint anywhere in the if statement I have the problem as soon as the if returns true (when I click somewhere in the game screen).
Anyone has an idea what could be happening ?