Darrel Hoffman
Darrel Hoffman

Reputation: 4646

Ignore default libraries in debugger

I'd like to be able to tell the debugger not to drill down into default libraries in C++. (I use both VS 2003 and VS 2010, depending on the project.) I almost never get any useful information out of this, and it's really tedious having to step through the default code.

For example, I pretty much never have to watch the code that changes a string literal into a std::string when it's passed as a function parameter, nor do I have to watch as that string is then compared to another string, destructed, or whatever. Having to step out every time the debugger starts bringing me down one of those rabbit holes is pretty annoying.

C# doesn't seem to have this problem - I only see my own code in the debugger and don't get bogged down in obscure default library code which I'm never going to change, and which is pretty close to unreadable anyhow. I just wish I could have this in C++ as well. It's one thing if there's actually an error (though that usually isn't very useful - better would be to have the error point to the line in my code that led down to where that error occurred). But stepping through when there's no problems with the code is almost never useful.

Upvotes: 0

Views: 773

Answers (1)

mihai
mihai

Reputation: 38573

In Visual Studio:
Solution Properties -> Debug Source files -> "Do not look into these source files"

Whenever the debugger takes you to a useless location that you don't want to see, you can add it there and it will be ignored.

Upvotes: 1

Related Questions