I got a windows form application with a timer.
Whenever I open a fullscreen application like a game and try to debug the timer, it completely ignores it. But the second I change the application to window mode, the debugging works.
I also tried pressing a key (using global hook) and debugging the click and the debugging worked while I was in the game (full screen).
Has anyone ever had this issue? how can it be fixed?
EDIT : It seems that even this doesn’t go into debug (Called OpenNewTempThread from Form1())
private void OpenNewTempThread()
{
Thread thread = new Thread(Temp) { Name = "TempThread" };
thread.Start();
}
private bool Temping = true;
private void Temp()
{
while (true)
{
while (Temping)
{
Thread.Sleep(5000);
}
Thread.Sleep(100);
}
}
Try putting this line in your code (it’ll work assuming you are running under a debugger):