Difference between putting a break point and calling DebugBreak()
Does anyone know what's the difference between using breakpoints and calling DebugBreak() func. for example in开发者_Python百科 windows platforms ?
The obvious difference is that putting a breakpoint in is an interactive process - it has to be done manually (by each developer who wants to break at a certain point). This is flexible, but manual.
On the other hand, as DebugBreak
is programmatic, it means that it affects all developers who run through that code (which may be appropriate if you always want developers to stop at that point as it means something's about to go wrong, for example) - but you won't be able to add breakpoints as flexibly while the code is executing.
Use each technique in its place - personally I don't use programmatically-forced break points very often at all.
精彩评论