0

Apologies if this is a repeat; I'm having a hard time figuring out what to search for, so have found nothing in regards to this on either Google or SO.

When I'm debugging C++ in either MSVS or Xcode, I often find myself in the following situation:

int main()
{
    foo(bar()); // << Debugger is here
}

void foo(int param)
{
  printf("%d", param); // I want to step to here
}

int bar()
{
  return 1; // But "Step Into" takes me here
}

Essentially, whenever I fill parameters using other functions, step-into takes me into each one of those parameter functions before taking me into the function I'm actually interested in.

It isn't a big deal, but when you have four or five parameters, clicking step-into, step-out gets fairly tedious. I could obviously just set a breakpoint at the start of the next function, but that can be tricky, especially if I'm using the debugger to trace someone else's code.

Is there anyway to skip stepping into parameter functions and just to step directly into the next function in the flow of the program? If not, could someone explain why the mechanics of the debugger prevent it?

Thanks

Alex Churchill
  • 4,887
  • 5
  • 30
  • 42

1 Answers1

0

There is the DebuggerStepThrough attribute in C#, but probably only in managed c++.

The best you can probably do in Visual Studio is right-click "step into specific".

Derek
  • 7,615
  • 5
  • 33
  • 58