Visual C# 2010 Express: show elements of array while debugging?
Isn't it possible to show all elements of an array or datatable etc. while debugging just by hovering over the elements pointer (like in Visual Studio)? I get some properties or so when I keep the mouse on the variable name but it doesn't show me the actual conten开发者_开发百科t! Can I change this or is this a limitation of Visual Express? (I'm using the 2010 version)
You just have to insert a breakpoint on or before the array
. Then there's several ways to view the array contents in VS.
Breakpoints:
http://msdn.microsoft.com/en-us/library/ktf38f66(v=vs.71).aspx
Debugging tutorial (has screenshots and details on exactly what your asking for):
http://www.dotnetperls.com/debugging
Another decent tutorial with details of debugging controls:
http://www.cprogramming.com/tutorial/visual_studio_breakpoints.html
F11: Step Into - This button is designed to allow the programmer to enter a function or a class allocation without having to set a breakpoint in the code. This is very useful for situations where you have a top level function that calls several other functions and you want to track the program flow going into that particular desired function. What will happen is when you enter a function, the debugger either jumps to another part of the code on the page if it exists in the same module, or loads the pertinent module for you and takes you to the beginning of the entered function. During this time you can continue to step line by line and watch where the program cursor goes to see what is happening in the code. You can of course set up watch variables along the way to monitor the function you stepped into.
精彩评论