Why does Visual C++ not hit a breakpoint in, or step through a specific function?

I have the following:

 ... code
 ... code

classA::FuncB(const char *pText)
    SelectObject(m_hDC, GetStockObject (  SYSTEM_FONT)); 
    wglUseFontBitmaps(m_hDC, 0, 255, 1000); 
    glCallLists(static_cast<GLsizei>(strlen(pText)), GL_UNSIGNED_BYTE, pText); 

I can hit breakpoints anywhere in FuncA. If I try to step into FuncB, it steps over. It will accept a breakpoint in FuncB, but never hits it. I know it is executing FuncB, because I can put a MessagBox() call in FuncB and get the message box.

I'm new to VS2005 after a few years away from extensive VC6 usage. The one situation like this I recall from my VC6 days, is if symbol information is not available. However, in this case both functions are in the same file, so the symbol information must be correct. Also in that case I think you couldn't even set the breakpoint.

I've tried all the silly voodoo like rebuilding the whole solution.

What stupid thing am I overlooking?

EDIT: Added code for FuncB in response to comment about it possibly being essentially inline-able. (It's just the exact sample code from MSDN for wglUseFontBitmaps [minus comments here]). I don't see how inlining that would impede stepping through each call.


Make sure all compiler optimizations are disabled (/Od). Compiler optimization can cause problems with debugger breakpoints.

Not sure what the problem is, but one thing you might try is to look at the disassembled code. You can switch betwen the source code and disassbled view with VS. I do not have the IDE in front of me at work, so the terms might be slightly off.

If you put the debugger into this mode, you can see what the assembly instructions that are executing. This helps sometimes to determine these kinds of problems. Sometimes, although not usually with a debug build, calls are optimized out by the compiler.

Need Your Help

eBay API to download user listing (eBay API user guide / step by step guide)

php xml ebay

I am new to the eBay API and currently developing in PHP, I have managed to use GetItem to import details of an order based on the Item ID to my website's database. But What I want to do now is to ...

HTML5 iOS/Android Keyboard Button

android ios keyboard

Is there any method you can call in HTML5/javaScript that will force the on-screen keyboard to appear in iOS/Android?

How do I get SQL database users & roles into my MVC EF project in Visual Studio?

c# asp.net-mvc visual-studio-2010 entity-framework visual-studio

I was able to create the SQL database tables using "schema compare" in visual studio. I added the login &amp; user to the database directly using T-SQL, and also used T-SQL to add the user to data...

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.