Break point hangs DirectX-based program in full screen mode
I started making a game, I have a global class that reads in a csv file, loads two direct x surfaces, and creates the background.
the surfaces are a tile sheet and the other the background created from the tiles. the background surface does no work, after instillation I check it and if null a message box appears. It always shows the message box.
I tried setting break points to see if the values are read in corectly fron the csv file but the program will not run. a box appears in the task bar, the program goes full screen but the screen goes black and does not show the message box and can only be stopped by ctrl,alt,del.
No matter were I put the break point even if it is in a different source file this happens. does anyone know why ?
p.s it is not a multi thread application.
Edit:
I am using visual studio开发者_JAVA百科 2005 and direct x 9.c
With directshow, it can be bothering to debug in full screen : if you really have to do it, I suggest either using a second screen (this way, you can debug on your screen 1 while your program runs in full screen on your screen2).
If this doesn't work, you'll have to use remote debugging (i.e. run the programm on a computer and debug on another).
Most probably, what happens is that your debug point is triggerred, but your screen is held by directshow and thus visual can't be displayed. Thus your programm is actually blocked by visual, it doesn't answer to anything (as the event loop is blocked by the debugger)
In order, I would:
- run in windowed mode
- run in dual screen with your debugger on other screen
- try to setup remote debug (good luck)
- maybe use the old good way to debug with printf / traces (log4cpp e.g.)
In visual studio, if your project is not configured in debug mode (and instead is configured as release) you will not be able to debug, so any breakpoints you set will be ignored. This could possibly be the problem.
forced it in windowed mode , you may modified or hook the application
精彩评论