Closed
Description
Type: Bug
Problem:
When VS Code is launched directly from the macOS Downloads folder (or other quarantined/read-only locations), it exhibits various intermittent issues including failed Electron application launches, debugger malfunctions, and update failures, even if some functionality appears to work initially. This appears to stem from macOS Gatekeeper's quarantine behavior and the application's inability to write to a read-only volume.
Steps to Reproduce:
- Download a fresh .zip archive of VS Code for macOS.
- Unzip the archive directly into the ~/Downloads folder.
- Launch VS Code directly from the ~/Downloads folder. Notice that there is NO prompt for the user to transfer file to ~/Applications folder, which is the main problem here.
- Use VS Code for a period, attempting to:
- Debug an Electron application (e.g., Positron).
- Use debugger features like "Step In" and "Step Over".
- Attempt to update VS Code itself.
Expected Behavior:
- VS Code should function normally, including debugging features and self-updates, regardless of whether it's launched from the Downloads folder.
- Alternatively, if such behavior is expected due to macOS security features, the user should be clearly prompted or warned to move the application to /Applications.
Actual Behavior:
When launched from the Downloads folder:
- Electron Application Launch Failure: An Electron application (Positron) launched from within VS Code fails with a TrustedTypePolicy error:
- Error: Failed to execute 'createHTML' on 'TrustedTypePolicy': The provided callback is no longer runnable.
Debugger Malfunctions:
- "Step In" and "Step Over" debugger functions intermittently stop working, requiring a restart or relocation of VS Code to resolve. This behavior was not consistently present, sometimes working initially and failing later.
Update Failures:
VS Code fails to apply updates, presenting the error message:
Cannot update while running on a read-only volume. The application is on a read-only volume. Please move the application and try again. If you're on macOS Sierra or later, you'll need to move the application out of the Downloads directory.
- Existing issue: Code won't update on macOS #7426
Potential Root Cause:
- This behavior is consistent with applications running from a macOS quarantined location (like Downloads) or a read-only mounted volume, as described in Squirrel.Mac issues (e.g., Gatekeeper Path Randomization makes life hard Squirrel/Squirrel.Mac#182) and general Electron app behavior (e.g., VSCode on Mac in Downloads folder unoplatform/uno#20611). - - Reinstalling VS Code manually and moving it to the ~/Applications folder resolved all observed issues.
Suggested Solution/Improvement:
It would be beneficial for VS Code's macOS installation process to:
- Prompt the user to move the application to the /Applications folder by default upon initial launch or after unzipping, if technically feasible within macOS restrictions.
- If an automatic prompt is not feasible, display a clear warning message to the user upon first launch from a non-standard location (like Downloads), advising them to move the application to /Applications for optimal stability and update functionality. This warning could specifically mention the potential for debugger and update issues.
Environment:
- OS Version: macOS Sequoia 15.5
- Electron Application: Positron 2025.07.0
VS Code version: Code 1.100.3 (Universal) (258e40f, 2025-06-02T13:30:54.273Z)
OS version: Darwin arm64 24.5.0
Modes:
System Info
Item | Value |
---|---|
CPUs | Apple M4 Pro (14 x 2400) |
GPU Status | 2d_canvas: enabled canvas_oop_rasterization: enabled_on direct_rendering_display_compositor: disabled_off_ok gpu_compositing: enabled multiple_raster_threads: enabled_on opengl: enabled_on rasterization: enabled raw_draw: disabled_off_ok skia_graphite: disabled_off video_decode: enabled video_encode: enabled webgl: enabled webgl2: enabled webgpu: enabled webnn: disabled_off |
Load (avg) | 2, 2, 2 |
Memory (System) | 48.00GB (0.70GB free) |
Process Argv | --crash-reporter-id 248e74bd-c6e9-4344-8c09-ef52846f33b5 |
Screen Reader | no |
VM | 0% |
Metadata
Metadata
Assignees
Labels
No labels