#Little question about Stepping

1 messages · Page 1 of 1 (latest)

tight fable
#

I want to confirm just.sooo pls
Step Into executes and debug code until selected line
Step Over executes and debug code until the "return" line of the function you have stepped on
Step Out the same as Step Over but it does so: if you stepped on function it executes program until the line where function was called , or how on a website they says "when functions returns"
Step Back executes and debug code from selected line to 0
Confirm pls people bc I am doing this stuff slowly.And if someone care about it, I posted it bc today I want to end with finishing reading page about stepping, and practice tommorow.(bc I got homework to do)

lilac scarabBOT
#

When your question is answered use !solved to mark the question as resolved.

Remember to ask specific questions, provide necessary details, and reduce your question to its simplest form. For tips on how to ask a good question use !howto ask.

lethal warren
#

Step into will step into any function call, step over will not, but both go forward 1 line of code

#

When you press step into, it will go 1 line forward, or if it's on a function call, it will go into the function

#

Step over is the same, but it will go over the function call

#

This is useful when a function is very trivial(like a getter) so you don't need to step into it

tight fable
tight fable
#

In translation I can understand that you mean:"it will execute only one selected line"

#

but doesn't it start from top of main()?

lethal warren
tight fable
#

when you answer only through time, it makes me think someone is chasing you and you typed as fast as you could

lethal warren
#

the functions still get called, the debugger just skips over them

tight fable
frigid parrot
#

Write some code and use the debugger. That's the best way to familiarize yourself with these features

tight fable
#

when i tried

lethal warren
#

step over will jump over the whole function without going into it

tight fable
#

OOOHOH

#

yeaaah I got it

#

with "into" you can examine functions too

lethal warren
#

like if you have a function like
int foo::getX(){ return x;} you dont want to step into this

tight fable
#

of pc

lethal warren
#

no

#

its because you dont care about a getter because its 1 line and you dont need to look into it when debugging

#

so you step over it because its behavior is trivial

lethal warren
frigid parrot
#

Yeah that makes absolutely no sense to me

tight fable
lethal warren
#

;compile

#include <iostream>

int main(){
  int a, b;
  std::cin >> a >> b;
  a+= 1;
}
bitter wrenBOT
#
Compilation successful

No output.

lethal warren
frigid parrot
#

Only thing I can think of is the code doesn't match

frigid parrot
#

But even then I don't think the debugger would work

tight fable
lethal warren
tight fable
#

mhm

#

uhhm

#

I mean doesn't matter ?

lethal warren
#

you dont need to step into a function that is completely trivial like a getter

frigid parrot
#

Sometimes you might want to

tight fable
tight fable
tight fable
#

okay guys but what about 2 others

#

is everything fine with them?