请问哪有在vs2003中断点调试的具体实例的教程下载啊?谢谢!问题解决后马上结帖!小弟用vs2003学做c#+asp.net网页快一年了!每次程序中报错都是根据经验来来改正;可从来没用到过什么调试啊!(我只知道怎样设断点,按F5是开始调试,F11是逐语句调试,F10是逐过程调试)每次程序有错都是花好长时间来改正,特别遇到那些“未将对象的引用设置到对象的实例”错误,更是头痛啊!因此想学一下在vs2003中断点调试的具体实例,可在网上到处找了,真没找到具体实例的教程啊!大侠如果知道哪有这些实例的教程,能不能给个网址看看?先谢了!问题解决后马上结帖!
不过楼主可以多设置几个断点,然后运行你的程序,按F10逐步调试,如果觉得没有错误,可以直接按运行的按钮,如果两个断点之间没有错误,它会立刻执行到下一个断点处。
楼主既然会根据经验来来改正,知道大概错误的地方,也就只需要在部分范围内设置断点了
如果想知道当时的变量,语句的值,可以选中变量或者语句,按下Ctrl+Alt+Q,弹出的框中可以看到当时的数据的值。
叫:<<VB.NET调试全攻略>> Mark Pearce著 谢俊 尹浩琼译
清华大学出版社不过也别对这书抱有太大希望,这些东西本来就很少,只能矬子里拔个将军了,
你要有兴趣可以找来看看。
最好还是多练习,积累些经验,在MSDN中看写文档可能还比较有帮助。
如果找不到也没有关系,把有关的所有调试窗口都打开,再把熟悉的程序调试一下,基本上就差不多了,把Autos先看一看就什么也明白了。immediate window 的用法我摘了一段:
The Immediate window allows you to type almost any variable, property, or expression and immediately see its value. To open the Immediate window, do any of the following:Press Ctrl+Alt+I.Select Immediate from the Debug/Windows menu commands.Click on the Windows icon of the Debug toolbar and select Immediate.You can enter expressions for immediate execution in the Immediate window. If you want to see the value of an expression, prepend it with a question . For instance, if the breakpoint is on the line shown in Figure 7-12, you can see the value of the integer i by entering:?iin the Immediate window and pressing Enter. Figure 7-13 shows the result of that exercise; additionally, this figure shows the process of assigning a new value to the variable i and then viewing its value again.
figure7-13 begin
?i
z
i=6
6
?i
6
figure7-3 end
You can clear the contents of the Immediate window by right-clicking anywhere in the window and selecting Clear All. Close the window by clicking on the X in the upper-right corner. If you close the window and subsequently bring it back up in the same session, it will still have all the previous contents.