摩纳哥编辑断点功能

时间:2018-05-23 12:28:58

标签: monaco-editor

我在项目中使用monaco-editor,我正在寻找断点功能。

相对于this conversation,没有内置的乐趣,这很可惜。

playground中有某种类似的东西,但是我没有通过点击装订线看到任何有类型的eventListener,所以我可以设置或删除我的断点。

所以,也许我错过了什么。请告诉我,如果有人有这方面的经验,因为这是非常受欢迎的编辑器,所以应该有断点的解决方案。

1 个答案:

答案 0 :(得分:0)

https://microsoft.github.io/monaco-editor/playground.html#interacting-with-the-editor-listening-to-mouse-events在字形边距上显示mouseDownmouseMove个事件。

Visual Studio Code source中,您可以看到editor.onMouseDown事件测试以检查排水沟是否被点击:

this.toDispose.push(this.editor.onMouseDown((e: IEditorMouseEvent) => {
    const data = e.target.detail as IMarginData;
    if (e.target.type !== MouseTargetType.GUTTER_GLYPH_MARGIN || data.isAfterLines || !this.marginFreeFromNonDebugDecorations(e.target.position.lineNumber)) {
        return;
    }
    ....
相关问题