請問菜單Run|Trace To Next Source Line和Run|Trace into的區別! (200分)

  • 主题发起人 主题发起人 chenghus
  • 开始时间 开始时间
C

chenghus

Unregistered / Unconfirmed
GUEST, unregistred user!
請問菜單Run|Trace To Next Source Line和Run|Trace into的區別!
 
Trace To Next Source Line/是运行下一行代码
Trace into/是运行到下一个form
 
Trace To Next Source Line(F8)是到当前代码的下一行,而不跳转到其他单元
f7是跳转到下一行执行代码处,可能是其他单元的。
f4是跳转到光标所在行
看帮助就是了
 
to:shenloqi

Trace To Next Source Line(F8)不對!,Trace To Next Source Line(Shift+F7)!
唉,如此多Delphi程序員,連一個菜單命令都搞不清!
 
对不起,上一次我的机器坏了,所以在没有Delphi的机器上随便以为,惭愧!
关于Shift+F7,Delphi 5的帮助这么说:
Use this command to stop on the next source line in your application, regardless
of the control flow. For example, if you select this command when stopped at a
Windows API call that takes a callback function, control will return to the next
source line, which in this case is the callback function.
F7 Delphi 5的帮助:
When you choose Run|Trace Into, the debugger executes the code highlighted by
the execution point. If the execution point is highlighting a function call, the
debugger moves the execution point to the first line of code or instruction
that defines the function being called. If the executing statement calls a
function that does not contain debug information, the debugger runs the function
at full speed (as if you had chosen the Step over command).
When you choose Run|Trace To Next Source Line, the debugger moves to the next
source line in your application, regardless of the control flow. For example, if
you select this command when stopped at a Windows API call that takes a
callback function, control will return to the next source line, which in this
case is the callback function.
When you step past a function return statement (in this case, the end statement),
the debugger positions the execution point on the line following the original
function call.
As you debug, you can choose to Trace Into some functions and Step Over others.
Use Trace Into when you need to fully test the function highlighted by the
execution point.
You can also use Run|Run Until Return to run the loaded program until execution
returns from the current function. The process stops on the instruction
immediately following the instruction that called the current function.
大致就是说Shift+F7不管怎么样都是执行到下一行,而F7会跳转到别的函数中。
 
大致就是说Shift+F7不管怎么样都是执行到下一行,而F7会跳转到别的函数中,錯,錯!!!
請實際測試!
 
经过实际测试(包括回调函数--鼠标钩子),没有发现差别,真是不好意思,我也不知道,
怎么测试都感觉是一样的,希望知道的人能够解释一下。
 
接受答案了.
 
很对不起,以前我不知道其中的区别,但是现在知道了,不知道楼主看不看得到
你调试的时候在CPU窗口就会知道F7以及Shift+F7的差别了:)
 

Similar threads

S
回复
0
查看
3K
SUNSTONE的Delphi笔记
S
S
回复
0
查看
2K
SUNSTONE的Delphi笔记
S
I
回复
0
查看
711
import
I
I
回复
0
查看
775
import
I
后退
顶部