weird (vs 2019) freeze, when going to fullscreen and placing breakpoints

empty desktopGL project 3.8.0.1641

put

_graphics.ToggleFullScreen();
or
_graphics.IsFullScreen = true; _graphics.ApplyChanges();

to Initialize or LoadContent

put break point to GraphicsDevice.Clear(Color.CornflowerBlue); (or anywhere in draw) and run

everything freezes, can’t even stop from task manager

edit.
not happening in dx project.


is this just me or is it known thing?

yea… This is why I ALWAYS debug in windowed… If you encounter a break-point or some bug / crash state, the system cannot recover from full screen…

I think I even have to sign out and back in, not able to use task manager…

I have heard of people running windowed without a border, so it looks exactly like full screen, but under the hood of the OS there are some problems with that, like screen-grabs not capturing the game etc…

Also don’t know about running 2 screens, you might be able to fullscreen your game on one, and have the code on the other… How cool would that be?

border or without border, no matter in this case.
maybe my vs is broken someway, there are other random crashes too. tried repair no help…

Also don’t know about running 2 screens, you might be able to fullscreen your game on one, and have the code on the other

just set some offset to Window.Position so it starts in other screen

I tried one of my games with 2 screens and it is possible to run VS 2019 in debug in one display and the game in full screen mode in the other.

I actually put a break point in my toggle full screen method and it stopped there and I was able to continue in debug when I pressed F12 to toggle fullscreen.

It did some unexpected minimizing of the game window sometimes but it was workable.

I usually don’t bother debugging in full screen mode as I fell foul of your issue in the past.

I do the 2 screen trick all the time. Placing the game on the primary screen and the code on the second screen works out best.
What I do is start VS 2019 and then move the code window over to the second screen (also the larger one in my situation), and then when the game is run it automatically starts on the primary screen.
You can do it the opposite way, but sometimes it doesn’t work right.

1 Like