Add/remove 通过单击装订线在 Ace 编辑器中设置断点 space

Add/remove breakpoints in Ace editor by clicking the gutter space

有谁知道 Ace 编辑器 API 可以通过单击编辑器 window 中的装订线来添加或删除断点?从 2012 年 5 月开始,我花了比我承认在 API reference, source code, forums, blogs, etc. and the best information I found so far is this answer 中寻找此功能的时间更多的时间。这是一个很好的起点,但是当在断点上方的代码中插入新行时,断点不会移动。我很难相信 Ace 现在没有将它包含在标准功能集中,因为这是我们在任何像样的代码编辑器中都期望的东西并且 Cloud9 环境支持它。

Ace 没有为此提供API。这是 Cloud9 https://github.com/c9/c9.ide.run.debug/blob/master/breakpoints.js#L727.
使用的实现 它很可能保存在 Cloud9 插件而不是 Ace 中,因为它取决于存储断点的格式,不同的 IDE 可能会有所不同。