Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement inferior in its own terminal on Linux #252

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jonahgraham
Copy link
Contributor

@jonahgraham jonahgraham commented Feb 7, 2023

Using DAP's runInTerminal this PR adds the ability to use that new terminal for the inferior's I/O.

This can be enabled by adding "inferiorTerminal": "integrated" or "inferiorTerminal": "external" or "inferiorTerminal": "auto" to the launch.json.

The basic idea of the inferior terminal on Linux is:

  • adapter requests client (aka vscode) to create a terminal (using runInTerminal)
  • in that terminal we run a small script that "returns" the tty name to the adapter (using an atomically created file with the output of tty command)
  • then the script waits until the adapter is complete by monitoring the PID of the adapter's node process

The script run in the terminal won't auto-stop when running the adapter in server mode (typically should only be used for development of the adapter)

Part of #161

TODO for this issue:

  • write a test
  • document the change here, or at least in cdt-gdb-vscode's package.json

Using DAP's runInTerminal this PR adds the ability to use that new
terminal for the inferior's I/O.

The basic idea of the inferior terminal on Linux is:

- adapter requests client (aka vscode) to create a
  terminal (using runInTerminal)
- in that terminal we run a small script that "returns"
  the tty name to the adapter (using an atomically created
  file with the output of tty command)
- then the script waits until the adapter is complete by
  monitoring the PID of the adapter's node process

The script run in the terminal won't auto-stop when
running the adapter in server mode (typically should only
be used for development of the adapter)

Part of eclipse-cdt-cloud#161
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant