In Visual Studio you can set a Breakpoint to stop the project at a particular line of code.
Once you set the Breakpoint to a line and you run the project, it will stop the project before executing the line and shows the particular line in the code editor.
To set a Breakpoint click the gray margin to the left of the line where you want to give a break.
The watch window opens only when the debugger is in running mode or break mode.
So open the watch window when the projects halts at the breakpoint through
Debug >> Windows >> Watch and select a watch window.
You can view the value of the variables by just pointing the mouse over the variable and also using the Watch.
If the variable is complex type like arrays or an object you should use the watch window.
To add the variables into watch window just select the variable and drag it to the watch window.
Click the + sign to view the subitems such as array elements or object properties.
Monday, January 25, 2010
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment