在Dyalog APL中条件断点后恢复执行

huangapple go评论81阅读模式
英文:

Resuming execution after conditional breakpoint in Dyalog APL

问题

在之前的问题中,我问过如何在Dyalog RIDE中设置条件断点,被接受的答案按照预期的方式工作,通过创建一个带有空函数调用作为主体的守卫语句来实现。当条件满足时,执行将在预期的行上停止。然而,由于这是一个守卫,如果我想要恢复执行,函数将返回,这不是我想要的——是否可能恢复执行,就好像未触发守卫语句一样?

英文:

In a previous question I asked about how to set a conditional breakpoint in Dyalog RIDE, and the accepted answer works as advertised, by creating a guard statement with an empty function call as the body. Execution will be halted on the expected line when the condition is met. However, this being a guard, if I then want to resume execution, the function will return, which is not what I want -- is it possible to resume execution as if the guard statement had not been triggered?

答案1

得分: 2

跳过当前行并恢复执行。

默认情况下,Ctrl+Shift+Enter会跳过当前行,无论是在跨平台的RIDE还是仅适用于Windows的IDE中。

如果您经常执行此操作,那么可以考虑将跳过行和恢复执行合并为单个功能键,这里是F7

IDE: 'FD' 'RM'⎕PFKEY 7

RIDE: 编辑 > 首选项… > 快捷方式 > "PF7":<FD><RM>

英文:

Simply skip the currect line before resuming execution.

By default, <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>Enter</kbd> will skip the current line, both in the cross-platform RIDE and in the Windows-only IDE.

If this is something you do often, then consider combining the line skipping and resumption of execution into a single function key, here <kbd>F7</kbd>:

IDE: &#39;FD&#39; &#39;RM&#39;⎕PFKEY 7

RIDE: Edit > Preferences… > Shortcuts > "PF7": &lt;FD&gt;&lt;RM&gt;

答案2

得分: 0

一个单一、较早的、跨平台的方法是使用 →⎕LC+1 分支到下一行。

⎕LC 是一个包含您挂起的行号的向量,因此第一个元素将是您停止的行号。增加这个行号然后跳转到那里将在下一行恢复执行。

英文:

A single, older, cross-platform way is to branch to the next line with →⎕LC+1

⎕LC is a vector of the line numbers where you're suspended, so will have the line you stopped as the first element. Incrementing this and then branching(jumping) there will resume execution at the next line.

huangapple
  • 本文由 发表于 2023年6月5日 21:53:46
  • 转载请务必保留本文链接:https://go.coder-hub.com/76407140.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定