如何查看Visual Studio Code扩展的安装历史及安装时间日志?
Great question—being able to trace back extension installs is a key tool for debugging unexpected setting changes or behavior. Here's how you can access install history, find timestamps, and systematically troubleshoot by removing recent extensions:
1. View Recent Install History Directly in VS Code
You can quickly see your installed extensions sorted by install date right in the UI:
- Open the Extensions panel with
Ctrl+Shift+X(Windows/Linux) orCmd+Shift+X(macOS). - Click the three-dot menu icon in the top-right corner of the Extensions panel.
- Select Show Installed Extensions to filter out disabled/uninstalled extensions.
- Click the Sort by dropdown (default is "Name") and choose Installed On. This will order extensions from most recently installed to oldest (or vice versa).
This gives you a quick overview of recent additions, though it won’t show full historical logs if you’ve cleared cache or reinstalled VS Code.
2. Access Detailed Install Timestamps via Log Files
VS Code keeps detailed logs of extension activity, including exact install times. The log location varies by OS:
- Windows:
%APPDATA%\Code\logs - macOS:
$HOME/Library/Application Support/Code/logs - Linux:
$HOME/.config/Code/logs
Inside this folder, you’ll find subfolders named with timestamps (e.g., 20240520T123456). Open the main.log file within these folders, and search for lines containing Extension installed: or Installing extension. Each entry will include a precise timestamp and the full extension ID (e.g., [2024-05-20 14:32:15.123] [info] Extension installed: ms-python.python).
These logs go back further than the UI’s sorted list, making them ideal if you need to trace installs from weeks or months ago.
3. Troubleshoot by Uninstalling Recent Extensions
To narrow down which extension is causing your setting issues:
- Use either the UI’s "Installed On" sort or the log files to get the order of recent installs.
- Start by disabling the most recently installed extension (right-click it in the Extensions panel > Disable), then reload VS Code (
Ctrl+Shift+P> Reload Window) and test your settings. - If the issue persists, disable the next most recent extension, and repeat. Once you find the culprit, you can uninstall it entirely.
Pro tip: If you have a lot of recent extensions, you can temporarily disable all extensions at once with Ctrl+Shift+P > Disable All Installed Extensions, then re-enable them one by one to isolate the problem faster.
内容的提问来源于stack exchange,提问作者jxramos




