Resolve regression where build task did not start in wsl#279249
Resolve regression where build task did not start in wsl#279249anthonykim1 merged 14 commits intomainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds temporary debug logging (prefixed with "MYLOG") to investigate a regression related to current working directory (cwd) behavior in WSL terminals. The logging traces cwd state changes through various lifecycle events in the terminal instance and shell integration addon.
Key Changes
- Added debug logging to track cwd state changes during terminal lifecycle events
- Instrumented shell integration capability addition, command restoration, and process creation
- Logged remote authority and user home information to help diagnose WSL-specific issues
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/vs/workbench/contrib/terminal/browser/terminalInstance.ts | Added 10 debug log statements tracking cwd changes, shell integration setup, and process creation in the terminal instance lifecycle |
| src/vs/platform/terminal/common/xterm/shellIntegrationAddon.ts | Added 3 debug log statements tracking cwd updates and command deserialization in the shell integration addon |
|
Testing result:
(Unexpected Results, at least to my understanding): Case 1) However, case 1 is the same for pre+post PR. Maybe I should handle this case 1 in separate PR since it will be new behavior Update: Resolved Case 2! Case 2 not same for pre-post PR, I probably broke something for case 2. --> Remote terminal works, but local in remote in untrusted still not working. ---> Got it working with: 2c40314 :) |
Resolves: #275011
Long story short, after 975a1ef, we ensure capabilities registered before shell integration events fire.
SOMEHOWShellIntegrationAddon._updatecwd and
onDidChangeCwdwas getting called beforecreateProcessin remote.Whereas, in non-remote, create process happened first, then updateCwd happened.
Edit: Maybe its more suspicious that activeWorkspaceUri is undefined.. for the wsl active workspace case:
Regardless, we were going into
vscode/src/vs/workbench/contrib/terminal/browser/terminalInstance.ts
Lines 1539 to 1543 in 51e7119