Rscpp logo

The ReSharper C++ Blog

The Visual Studio Extension for C++ Development

Tips & Tricks

Step Filters in ReSharper C++

It hasn’t been long since the first debugging-assistance features — inline values, searchable DataTips, and breakpoints navigation — appeared in ReSharper, but today we’re happy to present yet another cool feature — step filters in C++.

Why do you need step filters? Well, the illustration below explains pretty much everything:

ReSharper step filters

Some functions never need to be stepped into because they are either very simple or very well tested. But the problem is that the debugger cannot tell which functions are worth debugging and which aren’t, and therefore Step Into will not miss any user function on its way.
Visual Studio’s Just My Code functionality takes basic care of this problem by ignoring non-user code and letting you customize ignored symbols using text config files.

However with ReSharper C++, you can now visually maintain step filters — a list of function masks that tells the debugger what should be skipped on stepping. By default, this list includes a lot of library functions and it can be extended.

Of course, ReSharper wouldn’t be ReSharper without having some handy goodies here: to quickly add a function to the filters, you can press Alt+Enter on that function while debugging and pick the corresponding action:

A context action that adds a ReSharper step filter

The filters are stored using ReSharper’s layered settings. By default, the action saves the filter in the ‘Solution personal’ layer, but you can use the action’s submenu to choose where the filter should be saved — e.g in the ‘Solution team-shared’ layer, so that this filter will be also available to your teammates.

You can study and further configure step filters on the Tools | Debugging | C++ options page:

ReSharper C++: step filter options

As always, your feedback regarding this feature is most welcome, and you can try it right now in the latest build of ReSharper 2018.1 EAP.

Comments below can no longer be edited.

11 Responses to Step Filters in ReSharper C++

  1. HamRusTal says:

    April 5, 2018

    Sorry for the following offtopic:
    The page says that in EAP6, “ReSharper C++ introduces the Includes Profiler tool window”. I installed that and looked everywhere but failed to find the tool. How do I access it? (JIC, I only installed R# C++, without the greater R#).

    • Dmitry Matveev says:

      April 6, 2018

      In EAP6, you can select a C++ project or a solution with a C++ project in the Solution Explorer, or just some source files in a C++ project, right-click, and pick the ‘Includes Profiler’ action in the context menu.
      In 2018.1 release we are also going to add new actions to the main menu (‘ReSharper | Inspect | Analyze Includes in Solution’ and ‘ReSharper | Inspect | Analyze Includes in Current Project’)

  2. ReSharper Ultimate 2018.1 リリース! | JetBrains ブログ says:

    May 23, 2018

    […] Debug Step Filters […]

  3. Gilad Reich says:

    September 21, 2018

    Hi Dmitry Matveev,
    This is brilliant! I was looking for something like this and it’s really useful! Thanks for that 🙂
    One question I have, is there a way to make a Step Into filter to the whole class or specific external library I’m using?
    Say for example I want to filter all boost classes from stepping into instead of doing 1 function every time.
    Best wishes,
    Gilad Reich

    • Gilad Reich says:

      September 21, 2018

      I tried for example:
      As filter and it didn’t work unfortunately.

  4. Gilad Reich says:

    September 21, 2018

    Found it! 🙂
    I simply do that for boost:

    And for google tests:

    Even though it works, I hope this is the right way to go, if there is a better way, I would be happy to hear.
    This feature is so useful, another reason why I love JetBrains and a must have product during development.

    • Dmitry Matveev says:

      September 21, 2018

      Thanks for the feedback, Gilad! Yes, this is the right way to go.

    • Igor Akhmetov says:

      September 21, 2018

      Gilad, thanks for your feedback!
      We agree it’s sometimes useful to create a step filter not just for a specific function, but for one of its containing scopes instead. I’ve created a feature request so that there’s a separate action in the context menu for each of the scopes –

      • Gilad Reich says:

        September 21, 2018

        That’s great! Thanks for all the amazing work you guys are doing!

  5. heitho says:

    July 12, 2019

    I downloaded 2019.1.3 and run the trial period.
    I am using Visual Studio 2017 (15.9).

    “Of course, ReSharper wouldn’t be ReSharper without having some handy goodies here: to quickly add a function to the filters, you can press Alt+Enter on that function while debugging and pick the corresponding action:”

    This Action is missing in my menu.

    • Anastasia Kazakova says:

      July 12, 2019

      What exactly are you doing and when are you expecting the action to appear in the menu?
      Mind, this works only during the debug session and only when you’ve entered the function.

Discover more