Click here to get back home

how to break into the debugger?

 HomeNewsGroups | Search | About
 microsoft.public.smartphone.developer    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
how to break into the debugger? arongpan 09-01-2005
Get Chitika Premium
Posted by arongpan on September 1, 2005, 3:11 am
Please log in for more thread options
I want ot find some instruction for Smartphone platform just like _asm {int
3} to throw exception and then I can switch to debugger. But ASSERT(0) and
DebugBreak doesn't work for me. In debugging mode, the program stopped at
point where I insert ASSERT(0) or DebugBreak without any exception occured.
And when using "start without debugging" command, this macro has no effect at
all.

I'm using VS2005 Beta2, WM5 Smartphone SDK. This is my code.

#include <windows.h>

int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE, LPTSTR lpCmdLine, int
nShowCmd)
{
DebugBreak();
MessageBox(NULL, TEXT("text"), TEXT("caption"), MB_OK);
return 0;
}

I do work in debug project configuration, and the function DebugBreak() have
no effect at all when I "start without debugging". What's wrong?



Posted by Alex Feinman [MVP] on September 1, 2005, 9:05 am
Please log in for more thread options
What I usually do is put a MessageBox somewhere in the very beginning of the
code I'm going to debug. Then I run the app (without debugging, in any way I
need) and then I attach debugger and set a breakpoint(s). Then I dismiss the
message box and wait for my BP to be hit

--
Alex Feinman
---
Visit http://www.opennetcf.org
>I want ot find some instruction for Smartphone platform just like _asm {int
> 3} to throw exception and then I can switch to debugger. But ASSERT(0) and
> DebugBreak doesn't work for me. In debugging mode, the program stopped at
> point where I insert ASSERT(0) or DebugBreak without any exception
> occured.
> And when using "start without debugging" command, this macro has no effect
> at
> all.
>
> I'm using VS2005 Beta2, WM5 Smartphone SDK. This is my code.
>
> #include <windows.h>
>
> int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE, LPTSTR lpCmdLine, int
> nShowCmd)
> {
> DebugBreak();
> MessageBox(NULL, TEXT("text"), TEXT("caption"), MB_OK);
> return 0;
> }
>
> I do work in debug project configuration, and the function DebugBreak()
> have
> no effect at all when I "start without debugging". What's wrong?
>



Posted by arongpan on September 1, 2005, 6:25 pm
Please log in for more thread options

Thanks Alex, it really helps me.


Similar ThreadsPosted
weird thing: debugging cannot stop at the break point. October 18, 2005, 8:00 am
Problem with the debugger June 1, 2005, 10:27 am
debugger does not stop on breakpoint October 10, 2005, 6:51 am
Lauterbach debugger with Windows Mobile August 23, 2005, 12:09 am
Debugging eVC 4.0 compiled code with VS 5.0 debugger? October 18, 2005, 4:16 pm
Feedback required on native Device developer experiece, Managed and native debugger January 5, 2006, 4:23 pm

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap