Archived

This topic is now archived and is closed to further replies.

Preventing VC++ from stepping into a function

This topic is 5018 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I remember reading somewhere that it is possible to tell Microsoft VC++ not to step into specific functions even if you press F11 during debugging. Does this ring a bell to anyone? I remember you have to write the function''s name in some file that VC++ uses for that purpose, but that''s about it. Can someone refresh my memory or point me to a link where this is discussed? Thanks!

Share this post


Link to post
Share on other sites
No no, I''m not talking about a keyboard shortcut, it''s really a file that you can modify to instruct VC++ to never step into functions you specify. Kind of like it does with Win32 API calls. If you press F11 when you are about to call CreateFile() for example, you won''t step into any code (of course since it''s not available to us, but I''m talking about the behavior here...)

Any idea?

Share this post


Link to post
Share on other sites
Suppose I have this:

std::string strProperty = pObject->GetProperty()->AsString();

I might want to step into the AsString() function to debug it, but the GetProperty() function being very simple, I don''t want to have to go into it first before going into the AsString() function when I press F11.

This is a simple example, but I have more complex ones where the ability to not step into specified functions would be very useful.

Share this post


Link to post
Share on other sites
Put a breakpoint in AsString, then run it with F5. I don''t think that there is a way to do precisely what you''re writing about. It wouldn''t make much sense IMO. The breakpoint is well and sufficient.

Share this post


Link to post
Share on other sites
Yes, I know all this, but I know that what I''m talking about exists because I read an article about it a while ago. I just don''t remember where.

I''m not looking for a workaround either because I have lots of functions I''d like to flag as "don''t step into", so the breakpoint solution, although easy and obvious, would not be much of a time-saver, having to find and open the file where the function is to set the breakpoint and all... I mean that''s not a permanent solution to skip over specific functions so it''s not what I need.

Anyway, I''ll try to find the article again and post a link here if I find something.

Share this post


Link to post
Share on other sites