what could cause breakpoints to be ignored?

Rudolf Meier 291 Reputation points

Sometimes I have the problem that break points don't stop. And instead of guessing around, I'd rather like to understand how they work and why the sometimes fail. Now, from my understanding, a break point is a special cpu command "int 3" which triggers the cpu to jump into the debugger (easily explained).

The debugger then does it's stuff by detecting what to show to the developer. Here, at this point, I could imagine, that something goes wrong. In this case I'd expect to see "hey, I hit a debug-break and I have no idea why... I'm showing assembly code" ... but... sometimes when debugging a native (C++) application, nothing happens at all... and sometimes even not when I add a "DebugBreak();" into the code... and the same is true for .net... sometimes, even the hardcoded "System.Diagnostics.Debugger.Break();" has no effect. And I'm wondering why. Because I cannot imagine, that the cpu didn't jump into its interrupt table. So... who the hell handled this? And why did the debugger not get called? Or did it get the info and ignored it? ... why? ... some information would be great.

Visual Studio Debugging
Visual Studio Debugging
Visual Studio: A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.Debugging: The act or process of detecting, locating, and correcting logical or syntactical errors in a program or malfunctions in hardware. In hardware contexts, the term troubleshoot is the term more frequently used, especially if the problem is major.
952 questions
{count} votes