Author Topic: What's difference in callstack window between jump on doubleclick and switch on  (Read 1169 times)

Offline GNEPO

  • Single posting newcomer
  • *
  • Posts: 2
Consider the following code, but not the question about code.
#include <iostream>

void CallC()
{
    // put a break point here and then click debug start
    std::cout << "C called" << std::endl;
}

void CallB()
{
    std::cout << "B called" << std::endl;
    CallC();
}

void CallA()
{
    CallB();
    CallC();
}

int main()
{
    CallA();

    return 0;
}

I wonder what's difference they are, i have try both of them, but nothing difference happens. But i know here have difference between them. Thanks for your answer :)

Offline scarphin

  • Lives here!
  • ****
  • Posts: 644
Jump: jumps to the function,
Switch: switches to the stack frame that is allocated for the function.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 12828
    • Travis build status
Jump to function just moves the cursor to the file:line for that stack frame.
Switch to frame tells the debugger that this frame is the active frame and so all watches are evaluated for this frame.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline GNEPO

  • Single posting newcomer
  • *
  • Posts: 2
Thanks :) well done.