Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Has the VS2012 NativeDE\StepOver registry entry that prevents step-into for specific functions changed format?

I've come across several posts/blogs showing how to disable stepping into specific functions and/or namespaces (e.g., the boost libraries) using registry entries.

When I tried to do this with VS2012, I did not get the results expected.

I tried...

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\11.0_Config\NativeDE\StepOver]
"10"="std\:\:.*"
"20"="boost\:\:.*"

Has the format changed? Do I have the right registry entry?

like image 230
cwm9 Avatar asked Sep 23 '12 07:09

cwm9


2 Answers

I finally found a "solution":

Add a new .natstepfilter to C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\Packages\Debugger\Visualizers

<?xml version="1.0" encoding="utf-8"?>
<StepFilter xmlns="http://schemas.microsoft.com/vstudio/debugger/natstepfilter/2010">
  <Function><Name>boost::.*</Name><Action>NoStepInto</Action></Function>
  <Function><Name>std::.*</Name><Action>NoStepInto</Action></Function>
</StepFilter>

I'm not positive the "boost::.*" format is right in this specific example, but it should be this or something similar. You can look at the other .natstepfilter files in the folder for some more clues.

Unfortunately, according to a post I found, doing this does not work when debugging mixed-mode (e.g., C++/C#) applications, which is what I'm doing. I'll leave up this question for other persons trying to figure out how to implement this functionality and for anyone that might know a way to do this in mixed mode.

like image 128
cwm9 Avatar answered Oct 03 '22 01:10

cwm9


As an addendum to the previous answer (unfortunately I can't comment yet), there is already a file called default.natstepfilter in that directory, you can just add the two lines in there (before the </StepFilter>).

You may have to right click default.natstepfilter and go to Properties and uncheck Read-Only in order to change this file. You'll need administrator rights for this.

Example:

<?xml version="1.0" encoding="utf-8"?>
<StepFilter xmlns="http://schemas.microsoft.com/vstudio/debugger/natstepfilter/2010">
  <Function><Name>std::.*</Name><Action>NoStepInto</Action></Function>
  <Function><Name>__security_check_cookie</Name><Action>NoStepInto</Action></Function>
  <Function><Name>__abi_winrt_.*</Name><Action>NoStepInto</Action></Function>
  ...
</StepFilter>
like image 20
Assaf Mendelson Avatar answered Oct 03 '22 00:10

Assaf Mendelson