阅读:12786回复:5
debug时简便设置断点
我们在debug的时候,设置好断点查看信息,但因为有时候需要更改代码,重新编译后在debug,再次下断点,甚至来来回回10多次,每次都要重新下断点,特别是大的程序非常麻烦,那怎么来解决这个问题呢?
其实我们可以在需要断点的位置前一行 加入一个关键字 BREAKPOINT 然后直接运行r.d2+ F5运行 程序会自动走到这句进行断点。 |
|
最新喜欢:rich51... |
沙发#
发布于:2018-02-01 11:43
不错,,,没说还真没注意
BREAKPOINT Purpose: The BREAKPOINT instruction sets a program breakpoint when running in debug mode. Syntax: BREAKPOINT Usage: Normally, to set a breakpoint when you debug a program, you must use the break command of the debugger. But in some situations, you might need to set the breakpoint programmatically. Therefore, the BREAKPOINT instruction has been added to the language. When you start fglrun in debug mode, if the program flow encounters a BREAKPOINT instruction, the program execution stops and the debug prompt is displayed, to let you enter a debugger command. The BREAKPOINT instruction is ignored when not running in debug mode. Example: 01 MAIN 02 DEFINE i INTEGER 03 LET i=123 04 BREAKPOINT 05 DISPLAY i 06 END MAIN |
|
板凳#
发布于:2019-03-28 15:16
好知識
|
|
地板#
发布于:2019-04-27 16:07
原來有這個呀
|
|
4楼#
发布于:2020-01-08 16:11
刚好用上,非常感谢!
|
|
5楼#
发布于:2021-09-28 09:30
谢谢整理
|
|