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

RE: terminal.sendText function does not work on Arduino IDE (arduino/arduino-ide#58) #1

Open
dankeboy36 opened this issue Sep 20, 2023 · 1 comment

Comments

@dankeboy36
Copy link

New thread for arduino/arduino-ide#58 (comment).

@Quency-D, I can confirm this is a bug with the pseudoterminal in Theia. Related module: https://github.com/eclipse-theia/theia/blob/03d0cb83dc72f7a72158d69478494c7e99098e39/packages/plugin-ext/src/plugin/terminal-ext.ts.

The problem must be fixed in Theia IDE first, then picked up by Arduino IDE, then Terminal#sendText can be used as in VS Code. This is unfortunate. I will look into this more and give you a workaround as a PR soon and submit an issue in https://github.com/eclipse-theia/theia/.

As a quick hack, you can use pty#handleInput instead. For example, this works:

      terminal = vscode.window.createTerminal(options);
      terminal.show(true);
      setTimeout(() => {
        pty.handleInput('\x1b[31mHello2 world\x1b[0m');
      }, 1000);
Screen Shot 2023-09-20 at 13 20 29

Good luck with your project!

@dankeboy36 dankeboy36 changed the title RE: terminal.sendText function does not work on Arduino IDE RE: terminal.sendText function does not work on Arduino IDE (arduino/arduino-ide#58) Sep 20, 2023
@Quency-D
Copy link
Owner

Thank you for your answer and I look forward to your good news.

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

No branches or pull requests

2 participants