Is there a way to automatically avoiding stepping into certain functions in Visual Studio?
I found this blog entry which has a solution. Although I'd prefer to be able to say "don't step into anything that isn't part of this project", this looks workable.
EDIT: After looking at a few blogs and newsgroups, the method is to add an entry for each function that you don't want to step into under this registry key (assuming VS 2005):
32 bit Windows
\\HKEY_LOCAL_MACHINE\Software\Microsoft\VisualStudio\8.0\NativeDE\StepOver
64 bit Windows
\\HKEY_LOCAL_MACHINE\Software\Wow6432Node\Microsoft\VisualStudio\8.0\NativeDE\StepOver
Version numbers for the path:
Visual Studio 2005: 8.0
Visual Studio 2008: 9.0
Visual Studio 2010: 10.0
Visual Studio 2012: 11.0
Visual Studio 2013: 12.0
This key contains a set of rules which affect how stepping is performed. Each rule is specified as a separate entry whose name is a decimal number and whose value is a function name pattern that specifies which functions we want to affect. e.g.
"10" = "boost\:\:scoped_ptr.*\:\:.*=NoStepInto"
prevents stepping into boost::scoped_ptr functions.
The rules are evaluated from high to low values until a matching pattern is found, or there are no rules left. In that case the function is stepped into.
Function names are regular expressions.
Colons need to be quoted with a backslash.
You can specify StepInto as well as NoStepInto. This gives you a way to avoid stepping into all but a few functions in the same scope/namespace.
Restart Visual Studio to pick up the changes to the registry.
Visual studio 2015 . How to *not* step in certain functions?
Ok I actually found the solution. You have to edit as an administrator:
C:\Program Files (x86)\Microsoft Visual Studio
14.0\Common7\Packages\Debugger\Visualizers\default.natstepfilter
or
C:\Program Files\Microsoft Visual Studio
14.0\Common7\Packages\Debugger\Visualizers\default.natstepfilter
depending if you're under a 64 or 32 bit machine. The add a line like
<Function><Name>SomeFunction</Name><Action>NoStepInto</Action></Function>
HTH
Auto-skip STL functions during step-by-step debugging in Visual Studio
good question, the debugger constantly jumping into everything is indeed a huge slowdown and distraction during debugging. Luckily there's a solution:
open your registry editor, navigate to
HKLM\SOFTWARE\Microsoft\VisualStudio\10.0\NativeDE\StepOver
(add \Wow6432Node after SOFTWARE if you're on a 64bit machine, this casued me headaches in the past).
Add a new String Value (REG_SZ). The name is not so important, I used NoSTL for clarity and set it's value to
std\:\:.*=NoStepInto
This tells the debugger to not step into anything matching that regex so it will skip every function (global and class level) in the std namespace.
By using StepInto
you can add overrides for specific methods, and you can still use breakpoints off course. It's also handy to add some of your own methods that get stepped into often but of which you know the result by head.
Here is a more detailed explanation, google on NoStepInto
for more scattered information.
Prevent automatic step into inside .min.js files in visual studio, while debugging
In Visual Studio, there is no option "Just my Code" for JavaScript code, but in the browser if you are using F12 Developer tools, and you'll find "Just my code" which could prevent the Debugger tool from stepping into a library code.
The official doc about
Just my Code
In VS2015, how do I disable Step Into for auto-implemented properties?
Go to the VS2015 options -> debugging -> general and tick "Step over properties and operators".
Your step-into request resulted in an automatic step-over of a property or operator
It is not an error message as such. The IDE is telling you that tracing for some of your code is being skipped during debugging due to the current settings. If you want to be able to trace into the code, change the settings as described in the message.
You can change this behavior by going to: Tools -> Option -> Debugging.
How can I avoid debugging into Boost source code in Visual Studio?
Launch regedit
and navigate to the following key:
Under a 32bit OS:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\10.0\NativeDE\StepOver
Under a 64bit OS:
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\10.0\NativeDE\StepOver
Create a new string value there. Name it as you wish. Enter this as a content:
boost\:\:.*
(You need to restart Visual Studio.)
Related Topics
Order of Constructor Call in Virtual Inheritance
Unresolved Externals in C++ When Using Vectors and Find
Is Circumventing a Class' Constructor Legal or Does It Result in Undefined Behaviour
How to Check Whether Multiple Variables Are Equal to the Same Value
How to (Un)Escape Strings in C/C++
Cyclic Dependency Between Header Files
Std::Thread Is Not a Member of Namespace Std Using Eclipse Kepler Mingw
Difference Between Creating Object with () or Without
Constexpr Const VS Constexpr Variables
Difference Between Enum and Define Statements
Variable Number of Parameters in Function in C++