简体   繁体   English

摩纳哥编辑断点功能

[英]monaco-editor breakpoint functionality

I'm using monaco-editor for my project and I'm looking for breakpoints functionality. 我正在为项目使用monaco-editor ,并且正在寻找断点功能。

Accordingly to this conversation , there is no built in fun-ty and this is pity. 根据此对话 ,没有内在的乐趣,这是可惜的。

In playground there some sort of this thing, but I don't see any kinda eventListener by clicking on gutter, so I can set or remove my breakpoints. 操场上有某种东西,但是单击装订线后看不到任何种类的eventListener,所以我可以设置或删除断点。

So, maybe I've missed smth. 所以,也许我错过了某事。 Please, tell me if someone has experience with this, because this is pretty popular editor, so there should be solution for breakpoints. 请告诉我是否有人有经验,因为它是非常流行的编辑器,所以应该有断点的解决方案。

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

In Visual Studio Code source , you can see the editor.onMouseDown event tests for clicks on the gutter: Visual Studio Code源中 ,可以看到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;
    }
    ....

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM