Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

restore terminal session on startup issues when using both vscode and vscode insiders #136013

Closed
EllipticElysium opened this issue Oct 28, 2021 · 6 comments
Assignees
Labels
*as-designed Described behavior is as designed terminal-persistence Relating to process reconnection or process revive

Comments

@EllipticElysium
Copy link

EllipticElysium commented Oct 28, 2021

Issue Type: Bug

I always run both the regular and insiders version simultaiously (insiders for front end, regular for backend),
when I re-open my editors, the terminal shows "Session contents restored from [date] at [time]", and it does correctly show the previous commands, however when i press "up" to retrieve my prevous commands it looks like it is pulling it from the regular version, as it gives me "npm run watch" which i only ever run on the backend (regular version) and never on the insiders version.
expected behaviour is that it would give me "npm run serve" which is the last command i used in the insiders integrated terminal

step by step:
run vscode and vscode insiders with bash integrated terminal for each
run npm run serve on insiders, and npm run watch on regular
close insiders and re-open
see "session contents restored from [date] at [time]"
tap up arrow

result:
will give you the command "npm run watch"
expected result:
will give you the command "npm run serve"

VS Code version: Code - Insiders 1.62.0-insider (f961b92, 2021-10-28T05:15:59.105Z)
OS version: Windows_NT x64 10.0.19043
Restricted Mode: No

System Info
Item Value
CPUs Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz (4 x 3403)
GPU Status 2d_canvas: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
oop_rasterization: enabled
opengl: enabled_on
rasterization: enabled
skia_renderer: enabled_on
video_decode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
Load (avg) undefined
Memory (System) 15.89GB (6.80GB free)
Process Argv --disable-extensions --crash-reporter-id 39fb7dae-3747-496d-a8ee-f25193692d3c
Screen Reader no
VM 0%
Extensions disabled
A/B Experiments
vsliv695:30137379
vsins829:30139715
vsliv368:30146709
vsreu685:30147344
python383cf:30185419
pythonvspyt602:30291494
vspor879:30202332
vspor708:30202333
vspor363:30204092
pythonvspyt639:30291487
pythontb:30258533
pythonptprofiler:30281269
vshan820:30294714
pythondataviewer:30285072
pythonvsuse255:30319630
vscod805cf:30301675
pythonvspyt200:30323110
vsccppwt:30382699
pythonvssor306:30340298
bridge0708:30335490
pygetstartedt2:30353727
bridge0723:30353136
pythonrunftest32:30365365
pythonf5test824:30361779
javagetstartedt:30350119
pythonvspyt187:30365360
pydsgst2:30361790
vsaa593cf:30376535

@meganrogge meganrogge added the terminal-persistence Relating to process reconnection or process revive label Oct 28, 2021
@Tyriar
Copy link
Member

Tyriar commented Oct 29, 2021

When you see session contents restored it means the process was killed and got re-created. It's up for the shell you're using to persist the history and it wouldn't be able to correlate the current history with the past process' history.

@Tyriar Tyriar added the *as-designed Described behavior is as designed label Oct 29, 2021
@ghost
Copy link

ghost commented Nov 5, 2021

When I close VS Code, I expect the WSL terminal to terminate normally. When I launch VS Code again, I expect the WSL terminal to just open. This is the way it has been working for me for years. Now I am getting this message "Session contents restored from 11/5/2021 at 9:57:47 AM". I can infer from this that something is different about this current version of VS Code (1.62.0) that is causing the terminal to exit abnormally. How can I determine if this is the case, or have you introduced this message in the newest version, as I have never seen it before.

@Tyriar
Copy link
Member

Tyriar commented Nov 5, 2021

@vicel005 the message is a new feature that restored the buffer, you can disable it with terminal.integrated.persistentSessionReviveProcess

@pavelloz
Copy link

pavelloz commented Nov 24, 2021

This feature is INCREDIBLE slow, it should be disabled by default IMO.
On m1 max 10 core, with only vscode open, it restores 5 EMPTY sessions (no trash in envs, new computer) for like 4-5 seconds. This is the worst feature I've seen for a long time in vscode.
After disabling it, terminal works like usual, fast enough.

@Tyriar
Copy link
Member

Tyriar commented Nov 24, 2021

@pavelloz we found and fixed a bug in the feature a week ago, 4 seconds is actually spot on 👉 #133964

@github-actions github-actions bot locked and limited conversation to collaborators Dec 13, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
*as-designed Described behavior is as designed terminal-persistence Relating to process reconnection or process revive
Projects
None yet
Development

No branches or pull requests

5 participants
@pavelloz @Tyriar @meganrogge @EllipticElysium and others