tlaplus / vscode-tlaplus

TLA+ language support for Visual Studio Code
MIT License
351 stars 31 forks source link

Run TLC in VSCode integrated terminal #175

Open lemmy opened 3 years ago

lemmy commented 3 years ago

Some TLC-specific TLA+ operators such as PickSuccessor prompt users for (interactive) input (on stdin). This is currently unsupported because the extension just prints TLC's stdout/stderr to the output section of the model-checking results webview (check-result-view.html) and expects no input. I suggest changing the extension such that it (also) creates a proper VSCode terminal (not just read-only OutputChannel) with which a user can interact with TLC.

Screenshot from 2020-11-16 17-13-26

Long-term, this might be a use-case for the debug adapter protocol.

alygin commented 3 years ago

When I just started working on vscode-tlaplus there were pretty severe restrictions on how an extension could use a terminal window, so I decided to use output channels instead. But VSCode 1.37 introduced a terminal API (example), so I think it should be possible to switch to it.

As for the debug adapters, I watched your screencast, and I think it would be great to have such feature. Yet I didn't have time to dig into it, and understand how different components must interact to provide proper debugging experience.

lemmy commented 3 years ago

Re, debug-adapter-protocol. Prototype implemented with https://github.com/lemmy/vscode-tlaplus/commit/6752f0076274655a706e3229916232ca0ae5423d From a UX perspective, the launch buttons on the editor alone/independent of the debugger would be a nice addition.

Peek 2020-11-24 22-29