I'm new in C#. I hit a breakpoint and pressed F10 or F11.
Which key should be use for compilation?
Please help me out. Can you explain me what this keys does?
The F11 key in the Microsoft Visual Studio 2005 environment activates the Step Into debug function.
Check if you have function lock key -- 'F Lock' key on keyboard. If so then try pressing it once and then press F11 for debuging. Alternatively you can verify the working of F11 outside Visual Studio using it on IE or other windows and keying F11 , this should maximize the window. F Lock it is.
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.
F10 ("step over") does not descend any further into the call stack. It moves to the next line of the current function.
F11 ("step into") drills down into the function being called.
void function1() { function2(); function3(); }
If you hit a breakpoint on function2()
, F10 will advance to the line function3()
. F11 will advance to the first line inside function2
.
If you are an absolute beginner with Visual Studio, say Visual Studio 2017 :
The function keys F10 and F11 helps to follow the execution path in the code and thus helps to examine the intermediate results and debug the code.
You need to put a 'break point' to any line in your own code (inside a method (function)). Before executing the program, just CLICK at the leftmost border side of the code window corresponding to a code statement from which you need to start debugging. You can put multiple break points in your code.
Now Execute(run) the program, it will come to an automatic hault at your first break point. Now keep on pressing F10 to move from one statement to another to proceed with the execution of the program (in sequential order).
But if you are currently at a statement which includes a function (method) call such as FindSum(a,b);
and now if you press F11, it will take you to the fist line in the function FindSum(a,b)
and proceed. Note that pressing F10 when your current statement involves a function call, it will just execute the function (without taking you to the statements in the function body) and move to the next line in your code.
In short, pressing F11 will take you to every line including your function body, but F10 allows to move from one line to the the immediate next line.
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