Jump to content
  • Advertisement
Sign in to follow this  
hziee

how to debug release?

This topic is 4233 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 see somebady said asm can been beaked down in realse mode then i add this code in a programe int a; _asm{ mov eax,a; add eax,1; mov a,eax; //set a breakpoint here; }; but it doesn't interrupt in realsemode at all i use vs2003 IDE; can somebody tell me why? thanks.

Share this post


Link to post
Share on other sites
Advertisement
Why do you want to debug in release mode?
(Debug mode is designed for debugging. Release mode isn't.)

Share this post


Link to post
Share on other sites
Quote:
Original post by Hodgman
Why do you want to debug in release mode?
(Debug mode is designed for debugging. Release mode isn't.)



some bug may only appear in realse mode , so i want to break down and see what
really happen

Share this post


Link to post
Share on other sites
Visual Studio should be capable of catching breakpoints, even in release mode. I'm not sure about breakpoints in inline assembly code, but breaking in regular C/C++ code should work without problems. If possible, try setting your breakingpoint in nearby non-assembly code, and stepping into the assembly block.

Failing that... are you absolutely sure the code is actually being executed? Have you tried alternative debugging methods like logging?

Share this post


Link to post
Share on other sites
You can also do:
_asm int 3;
Which is a debugger interupt, which should have the same effect as hitting a breakpoint.

Share this post


Link to post
Share on other sites
thank you for all above.

Evil Steve's idear is what i want.

to ApochPiQ: vs can catch break points in realse mode? i never do it sucess.
i know some other ways to debug realse, i just want to know one more way.

english is my second language, so i some time not express myself well....

Share this post


Link to post
Share on other sites
In my experience, Visual Studio has limited capabilities regarding breakpoints in release mode. Linear, static code shouldn't cause you any trouble, but inline functions and dynamically bound code (such as that in a DLL) will likely confuse the debugger. I've found that if your breakpoint (in the VS IDE) appears with a question-mark inside it, then it won't trigger. The converse isn't necessarily true though - I've seen a few seemingly good breakpoints fail to trigger.

If you only need unconditional breakpoints that last the lifetime of the applications (i.e. don't need to be switched on/off at run-time) then coding INT3s in should do you fine. Otherwise, if VS is no help, you'll probably need to get hold of a more powerful debugger. OllyDbg (32-bit only) is an excellent choice if you're comfortable with a disassembly. It has support for source code, but only secondarily to the disassembly, so don't expect things to be a pretty as in Visual Studio.

Admiral

Share this post


Link to post
Share on other sites
This may be a dumb question, but you did enable "Generate Debug Info" and "Generate Browse Information" in the Release configuration, right?

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!