Terminal in nRF Connect extension in VS Code

I am using the RTT termina in the nRF Connect extension in VS Code to show output from my project with the LOG_xxx macros. This is working fine but sometimes I need to stop the output and examine just a part of the output. I can scroll back in the terminal window to do so but as soon as the scroll buffer is getting full the, text in the terminal continues scrolling up, showing more recent log output and the part I want to study is gone.

What I want to do is to temporarily stop the terminal from receiving input. I can get this result by pulling out the JTAG connector.

I can copy the text from the terminal window and paste it into a text editor like Notepad++ but then I lose the color coding, which I find quite useful to pinpoint things in the output when debugging.

I can sort of achieve this with with J-Link RTT Viewer (Disconnect/Connect) but even though J-Link RTT viewer does handle ANSI escape codes for colors it does not handle ANSI escape codes to move the cursor to a certain column which the terminal in VS Code does.

Is there any way to temporarily disable the input to the nRF Connect RTT terminal in VS Code like Connect/Disconnect a terminal in J-Link RTT Viewer?

/Ruben

Parents Reply
  • but then I lose the color coding,

    I think the color is nRF Terminal specific, related to the tags for the messages. You could probably create your own text editor syntax thingy for these logs which would detect <err> and so on to color your syntax in other programs.

    showing more recent log output and the part I want to study is gone.

    The JLink RTT Viewer has a logging feature where you can write the RTT logs directly to a file. This could be useful for your.

    In short, I do not think we have the feature you are looking for. However, I will suggest the feature "Add ability to configure max lines in nRF Serial" the to our VS Code extension team.

    Does this answer your questions?

    EDITED:

    Configure terminal.integrated.scrollback . Default is 1000 lines

    https://code.visualstudio.com/docs/terminal/basics#_navigating-the-buffer

Children
  • Thanks,

    Even though increasing the scrollback buffer helps, it only delays the problem because eventually the interesting text will be replaced with new input.

    Ideally I would like to do 'Kill Terminal' but keep the window open.

    I just found a way to do this without pulling the JTAG or the USB cable or switching off power to the board: Just start a new RTT terminal and input to the old will stop and go to the new one instead but the old will still be around. The old can then also be moved into the editor area (Move Terminal into Editor Area) and then be dragged out to  the desktop if I want...

    I am happy with that, thanks.

    /Ruben

Related