Debugging
-
I have some question: a) In debug mode when we press F11 then it shows next step, like this can debug backward, means previous step. b) What is use stepInto, stepOver. c) When we put a breakpoint there is condition clause, how can we use this. Suppose I want to hit a breakpoint only when the value of x=10. Is this can be done. I am using vs2003.net & debugging a C# application. Thanks in advance.
-
I have some question: a) In debug mode when we press F11 then it shows next step, like this can debug backward, means previous step. b) What is use stepInto, stepOver. c) When we put a breakpoint there is condition clause, how can we use this. Suppose I want to hit a breakpoint only when the value of x=10. Is this can be done. I am using vs2003.net & debugging a C# application. Thanks in advance.
a) F11 Steps into a funktion when you debug. Shift+F11 Runs the funktion to the end and then stop at the call to the function for you to continue debugging (jumps out of the function). You can move the debugarrow if you want to jump over something or run some code again. If the code is i++; then i++; will be done again that means if you run the code twice i = i + 2; b) Stepinto = F11 , stepOver = F10 c) Rightclick the breakpoint and choose condition... Write x = 10; in the textbox and check the radiobutton "is true".
-
I have some question: a) In debug mode when we press F11 then it shows next step, like this can debug backward, means previous step. b) What is use stepInto, stepOver. c) When we put a breakpoint there is condition clause, how can we use this. Suppose I want to hit a breakpoint only when the value of x=10. Is this can be done. I am using vs2003.net & debugging a C# application. Thanks in advance.
1 - you can use 'set next statement' to 'go back', but you can't rewind the statement that just ran, no 2- step into goes into a method when you're calling it 3 - you set the condition to x == 10 and it will only stop if x is 10 when this code is run, this is important. It won't stop the moment x is 10, but the iteration over that breakpoint where x is 10.
Christian Graus - Microsoft MVP - C++ "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )