If often encounter following situation:
int HelperFunction(int somevalue)
{
...
}
void FunctionToDebug(int somearg)
{
...
}
...
SomeFunction();
>> FunctionToDebug(HelperFunction(somevalue))
...
Now I'm stepping through my code and I arrive at the function call marked with >>
in the code snippet above.
When I use the "step into" command, the debugger will first step into HelperFunction
and then into FunctionToDebug
which is expected but which can be annoying e.g. if HelperFunction
is fully debugged.
Is there some functionality or trick that would allow me to step directly into FunctionToDebug
without stepping into the functions called during the evaluation of the arguments (HelperFunction
here)?
EDIT
Its not really a duplicate of this:
Is there a way to automatically avoiding stepping into certain functions in Visual Studio?
as I'd like to decide on the spot if I want to step into the arguments or not, but it's interesting anyway though.
Ans: Step Into: Step Into is used for debugging the test steps line by line. When the procedure gets called, Step Into enables you to get inside the procedure and debugs the procedure steps line by line. Step Over: Step Over will enable, only after the debugging is started with Step Into / Run From Step / Run to Step.
Begin code stepping by selecting F10 or F11. Doing so allows you to quickly find the entry point of your app. You can then continue to press step commands to navigate through the code. Run to a specific location or function, for example, by setting a breakpoint and starting your app.
To set command-line arguments in Visual Studio, right click on the project name, then go to Properties. In the Properties Pane, go to "Debugging", and in this pane is a line for "Command-line arguments." Add the values you would like to use on this line. They will be passed to the program via the argv array.
When a programmer creates code they can add what is known as a breakpoint. A breakpoint is a point in the program where the code will stop executing. For example, if the programmer amended the logic error in the trace table example they may wish to trigger a break point at line 5 in the algorithm.
Yes, but it's well hidden and easy to forget - not in the Debug drop-down menu. Put the cursor on the function call, then
right-click -> Step Into Specific -> [name of function]
I have repeatedly sent suggestions to MS that they add a version of Step Into that steps directly into the outermost function call. I ask you to do the same. It should be listed in the Debug menu along with Step Into, Step Out Of, and Step Over. Nothing is more tedious than stumbling into that maze of twisty passages that is Dinkumware.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With