I'm using Visual Studio 2022 Community and trying to make the debugger ignore some functions during the "Step Into" command. I have the following code in main.cpp
:
#include <iostream>
void func(int x)
{
std::cout << "func(" << x << ")\n";
}
void wrapper(int x)
{
std::cout << "wrapper start" << "\n";
func(x);
std::cout << "wrapper end" << "\n";
}
int main()
{
wrapper(10);
wrapper(10);
}
and the following my.natstepfilter
file in the same project:
<?xml version="1.0" encoding="utf-8"?>
<StepFilter xmlns="http://schemas.microsoft.com/vstudio/debugger/natstepfilter/2010">
<Function>
<Name>wrapper</Name>
<Action>NoStepInto</Action>
</Function>
</StepFilter>
based on examples from the documentation. There was an announcement that it's possible to have this file in a project since Visual Studio 2022 version 17.6, not user-wide/system-wide.
However, the file seems to be completely ignored. The debugger steps into both wrapper
and func
, and there are no errors in its "Output" window.
I've also tried putting the my.natstepfilter
file to user-wide and system-wide locations to no avail.
What am I doing wrong?