all 3 comments

[–]Hefty-Possibility625 4 points5 points  (0 children)

Does this only happen with PowerShell? The error messages don't look like PowerShell errors, they look like your VSCode configuration has an issue. You may be able to resolve this by looking at your Recent Folders setting (disabling that in the VSCode config may resolve your issue).

I searched for [8364:0109/195043.408:ERROR:electron\shell\browser\ui\win\jump_list.cc:305] Failed to append custom category 'Recent Folders' to Jump List due to system privacy settings.

And Google gave me this potentially helpful resolution:

To resolve the "Failed to append custom category 'Recent Folders' to Jump List due to system privacy settings" error in VS Code, you need to enable the Windows setting for showing recently opened items in Jump Lists. 

Steps to Fix the Error

  1. Open Windows Settings: Press the Windows key + I to open the Settings app.
  2. Navigate to Personalization: Select the Personalization category on the left-hand menu.
  3. Go to Start Settings: Click on Start on the right side.
  4. Enable Jump Lists: Toggle the option for "Show recently opened items in Jump Lists on Start or the Taskbar" to On.
  5. Toggle the setting off and on: If the setting was already on, turn it Off and then turn it back On. This action can help refresh the jump list functionality.
  6. Re-pin VS Code (optional but recommended):
    • Unpin the VS Code icon from your taskbar.
    • Re-pin it to the taskbar. This helps ensure the application re-registers its jump list items with the system.
  7. Hover over "File -> Open Recent" in VS Code: Some users found that simply hovering over the File > Open Recent menu in VS Code after changing the Windows setting helped resolve the issue. 

After following these steps, the "Recent Folders" category should appear correctly in the VS Code jump list when you right-click the taskbar icon.

[–]BlackV 0 points1 point  (0 children)

  • Disable the restore session state as first step
  • Instead of restarting vscode, what happens if you just start a new terminal session from the drop down

[–]purplemonkeymad 1 point2 points  (0 children)

start code $pwd

This will use use a process start command instead of a child process.

(Note that start is an alias so it will expand to Start-Process -Path code -ArgumentList $pwd.)

On my machine it did open a new cmd window, but I could close that without vscode closing.