A very simple situation. I\'m working on an application in Delphi 2007 which is often compiled as \'Release\' but still runs under a debugger. And occasionally it will run under
You can also do
if DebugHook <> 0 then ...