Perry
管理员
管理员
  • 发帖数213
  • QQ396572376
  • 金币41343两
  • 威望11335点
  • 钻石8888枚
  • 注册日期2016-11-09
  • 最后登录2024-01-30
  • VIP会员
  • 荣誉会员
  • 优秀斑竹
  • 最爱沙发
  • 原创写手
  • 社区居民
阅读:12276回复:5

debug时简便设置断点

楼主#
更多 发布于:2016-11-23 09:12
我们在debug的时候,设置好断点查看信息,但因为有时候需要更改代码,重新编译后在debug,再次下断点,甚至来来回回10多次,每次都要重新下断点,特别是大的程序非常麻烦,那怎么来解决这个问题呢?
其实我们可以在需要断点的位置前一行 加入一个关键字 BREAKPOINT 然后直接运行r.d2+ F5运行 程序会自动走到这句进行断点。
喜欢1 评分0

最新喜欢:

rich5168rich51...
官方QQ群:556775727  
foxerfly
中级会员
中级会员
  • 发帖数37
  • QQ12414173
  • 金币5两
  • 威望64点
  • 钻石0枚
  • 注册日期2017-10-05
  • 最后登录2020-08-07
沙发#
发布于: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
回复(0) 喜欢(0)     评分
lyl_dg
初级会员
初级会员
  • 发帖数21
  • QQ826716311
  • 金币25两
  • 威望36点
  • 钻石0枚
  • 注册日期2019-03-28
  • 最后登录2020-06-11
  • 社区居民
板凳#
发布于:2019-03-28 15:16
好知識
回复(0) 喜欢(0)     评分
lyl_dg
初级会员
初级会员
  • 发帖数21
  • QQ826716311
  • 金币25两
  • 威望36点
  • 钻石0枚
  • 注册日期2019-03-28
  • 最后登录2020-06-11
  • 社区居民
地板#
发布于:2019-04-27 16:07
原來有這個呀
回复(0) 喜欢(0)     评分
pping45
中级会员
中级会员
  • 发帖数26
  • QQ231449816
  • 金币71两
  • 威望66点
  • 钻石0枚
  • 注册日期2019-12-17
  • 最后登录2020-06-30
4楼#
发布于:2020-01-08 16:11
刚好用上,非常感谢!
回复(0) 喜欢(0)     评分
wasenw
高级会员
高级会员
  • 发帖数146
  • QQ785845530
  • 金币66两
  • 威望49点
  • 钻石0枚
  • 注册日期2021-08-19
  • 最后登录2021-10-21
5楼#
发布于:2021-09-28 09:30
谢谢整理
回复(0) 喜欢(0)     评分
游客

返回顶部