Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to prevent VS Code to remember terminal sessions

New version of VS Code started restoring Terminal sessions from the last time it was used. How to override that behavior?

enter image description here

like image 667
NeNaD Avatar asked Dec 03 '22 09:12

NeNaD


2 Answers

This config in settings.json solved it:

"terminal.integrated.persistentSessionReviveProcess": "never"
like image 61
NeNaD Avatar answered Dec 27 '22 08:12

NeNaD


So your settings are visible in JSON or UI format. For JSON @Nenad Milosavljevic solution should do the job. I'll explain the UI one.

  1. Open command palette (CTRL + SHIFT + P)

  2. Type user settings and select the option Command paletter navigation

  3. Select Features > Terminal > scroll down a little where you'll find the option and then uncheck the option "Integrated: Enable Persistent Sessions" Settings option

  1. Close the tab and you're done.
like image 25
Harsh Avatar answered Dec 27 '22 09:12

Harsh