Skip to content

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

Open
@dankeboy36

Description

@dankeboy36

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions