How do breakpoints in visual studio work? I'm asking this because I have some inline functions declared in the class header, and whenever I set a breakpoint in one of them, I think the IDE also puts breakpoints to wherever the function is called. Which of course makes sense, but how exactly is it done internall开发者_如何学JAVAy?
The function you are placing breakpoint in, are inline, and that's why debugger is smartly misplacing them somewhere else. It may be you are debugging a non-Debug build. Try
- Disabling all optimizations
- Make function non-inline
Your question doesn't demand this, but you can read here how breakpoints are implemented.
精彩评论