I added logging the terminal output to txt file, and this is enabled via a function in .bashrc
:
start_terminal_logging(){ if [ -z "$SCRIPT_LOG_FILE_ACTIVE" ]; then # Log each session to a separate file: logdir=~/.terminal_logs logfile=$logdir/session_log_$(date +%Y%m%d_%H%M%S)_$$.txt # If no folder exist make one: if [ ! -d $logdir ]; then mkdir -p $logdir fi export SCRIPT_LOG_FILE_ACTIVE=$logfile # Start logging, a=append, q=quiet: script -aq $logfile exit fi}# Start the logging(script above):start_terminal_logging
This worked in normal bash terminal, but not in the VS Code terminal, so I moddified user's settings.json
to reset the variable which was causing problems to VS Code (it was inherited from the environment I guss, so I reset it):
"terminal.integrated.env.linux": {"SCRIPT_LOG_FILE_ACTIVE": null, }
This worked, and now logging from VS Code terminal is OK too, however, after I added this, the Conda evnironment is not automatically started in VS Code as it used to. What could be the problem?