Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Breakpoint set in callback function (directx onframemove) not work

31 views
Skip to first unread message

huh?

unread,
Jul 7, 2009, 1:21:01 PM7/7/09
to

Not sure where to ask this question so I'll try here....

I created a directx application based of the emptyproject generated code.

As I add my code I set a break point on a line of code in the function
OnFrameMove.

When I run the code using 'Start debugging' the application and the IDE
essentially hang. The application window never shows when I click on the app
in the task bar. The IDE is basically hung.

When I switch to the IDE process, clicks anywhere in the UI are ignored.

I have to use the task manager to stop my directx app and I get a 'send an
error' to MS dialog box.

Why can't I set a break point in the callback function and have it break
properly.

To note, if I set the breakpoint in wWinMain function it breaks properly.

Without breakpoints in the OnFrameMove function the application runs fine.
I can tell that onframemove is called because I output to a log file and
the log output is there.

Why am I unable to break in the callback function? Do I need to do something
different or additional?

Nathan Mates

unread,
Jul 7, 2009, 1:42:02 PM7/7/09
to
In article <AC169F63-5EEE-4116...@microsoft.com>,

=?Utf-8?B?aHVoPw==?= <h...@discussions.microsoft.com> wrote:
>As I add my code I set a break point on a line of code in the
>function OnFrameMove.

>When I run the code using 'Start debugging' the application and the
>IDE essentially hang. The application window never shows when I
>click on the app in the task bar. The IDE is basically hung.

Two questions: (1) Are you using a debug build of your code?
(2) Are you running windowed?

To explain in more detail, (1) it's much harder for the debugger to
set up a breakpoint in release code. If you're just starting out on a
project, you should probably be running debug for now. And for (2),
fullscreen apps and the debugger can be hard to debug. If you have a
multimonitor setup, it can be a little easier to debug if you have the
debugger on one screen, and your app on another, but windowed mode is,
in general, MUCH easier to debug DirectX apps.

Nathan Mates

--
<*> Nathan Mates - personal webpage http://www.visi.com/~nathan/
# Programmer at Pandemic Studios -- http://www.pandemicstudios.com/
# NOT speaking for Pandemic Studios. "Care not what the neighbors
# think. What are the facts, and to how many decimal places?" -R.A. Heinlein

huh?

unread,
Jul 7, 2009, 3:21:01 PM7/7/09
to
Hi,
Answers are:

1) Yes I have set the project to debug using Bulid->Configuration Manager.
This shows 'Active solution confguration' dropdown set to 'Debug'.

2) I am running in full screen (since its a game I am working on, of
course!) per the following:
DXUTCreateDevice( false, 1400, 1050 );

But I can switch to windowed mode by setting the first param to true (yes?).
I'll try this.

Never had this issue with VC++ 6.0 which I have only just stopped using to
leapfrog into the world of VC++ 2008 express !

huh?

unread,
Jul 7, 2009, 3:25:02 PM7/7/09
to

Hey, that works !!!

Thanks !!

Unless there is some way to have this work full screen I can continue along
in windowed mode and switch to full screen when I want a release build.

Nathan Mates

unread,
Jul 7, 2009, 4:57:28 PM7/7/09
to
In article <7DFA9AEA-5F19-4094...@microsoft.com>,

=?Utf-8?B?aHVoPw==?= <h...@discussions.microsoft.com> wrote:
>Unless there is some way to have this work full screen I can
>continue along in windowed mode and switch to full screen when I
>want a release build.

I've worked on several commercial videogames that use DirectX. We
generally supported a commandline flag to force windowed mode and also
ingame configuration of default video mode. I believe the DXUT
framework has support for reading a commandline, or you can roll your
own. Just make it so that when you launch from the debugger, it has
the "go windowed" commandline flag set. End users can add that flag if
they want, or they can double-click on the exe and run fullscreen.

0 new messages