3

I have an issue for one or two weeks with VS Code. I am not sure if it's about an update or something, but when I'm doing commands in the terminal, I have them in the terminal history until killing terminal. Then, the history is the same as the one from the regular terminal on Mac. The commands ran in VS Code's context don't appear any longer. But any new command that I run in the regular Mac terminal shows up in the VS Code terminal.

I looked for a while in different topics about this or tried to change different VS Code settings, but nothing worked. What can I do to have the commands ran in VS Code shown in terminal history?

2
  • "But any new command that I run in the regular Mac terminal shows up in the Vs Code terminal" that itself is an oddity. Have you done some Zsh-equivalent of Bash's export PROMPT_COMMAND='history -a' in any of your shell config files?
    – starball
    Commented Apr 26, 2023 at 18:50
  • possibly related: github.com/microsoft/vscode/issues/151105
    – starball
    Commented Apr 26, 2023 at 18:51

1 Answer 1

-4

It seems like you're experiencing an issue where the old commands aren't visible in your VS Code terminal. There could be a few reasons for this:

Terminal Buffer Limit: The terminal might have a limited buffer size, causing it to not display older commands. You can check the settings or preferences in VS Code to increase the buffer size if that's the case.

Clearing or Scrollback: Sometimes, terminal settings or extensions might be set to clear or limit the scrollback buffer, which prevents you from seeing old commands. Check your VS Code settings or any terminal-related extensions for options related to clearing or limiting the terminal history.

Terminal Shell Configuration: It's also possible that your shell (like PowerShell or Command Prompt) has settings that limit the history displayed. You might need to adjust settings within your specific shell configuration.

Extension Interference: Certain extensions might modify the behavior of the terminal in VS Code. Try disabling any terminal-related extensions temporarily to see if they are causing the issue.

To investigate further, consider checking the settings/preferences both in VS Code and within your terminal (such as PowerShell or Command Prompt) to ensure there are no limitations on the terminal history. If you're unsure about how to adjust these settings, feel free to share more details about your setup, and I can provide more specific guidance!

2

Not the answer you're looking for? Browse other questions tagged or ask your own question.