On my macOS, pressing the cmd button (as I do for cmd-Tab to switch windows) (and perhaps other keys) halt the interpreter.
The problem seems to be this bit of code:
The purpose seems to be halting the interpreter when the editor content gets modified?
I am not sure if the keyDown event is suitable for this.
Aren't there any other means to archieve this? For example, I suppose you have another detection when the editor content shall be re-compiled. This could stop the interpreter, too.
Concerning #15, it would be interesting to be able to edit and compile the program WHILE debugging.
You're right: editor.onDidChangeModelContent is better suitable than editor.onKeyDown -> fixed.
The Compiler is separated as much as possible from other components (editor, gui, ...) in order to make it usable separately (e.g. for unit-testing).
This goal is very difficult to achieve because the compiler currently always builds entire executables and is not able to identify individual program changes and incorporate them into an existing executable. For me it's a miracle that other systems (e.g. Java hot swap) can do this at runtime.
On my macOS, pressing the
cmd
button (as I do forcmd-Tab
to switch windows) (and perhaps other keys) halt the interpreter. The problem seems to be this bit of code:https://github.com/martin-pabst/Online-IDE-new-compiler/blob/72537b027876f12b86034a2878653e556cb5bdcf/src/client/main/gui/Editor.ts#L105-L118
The purpose seems to be halting the interpreter when the editor content gets modified?