Skip to content

Opening a MATLAB Project breaks the Workspace panel's live data updates (independent of startup/shutdown script content) #350

Description

@JohannesBauer-M

Environment
• Extension: MATLAB (MathWorks), version 1.3.13
• MATLAB: R2025b Update 6 (25.2.0.3312555)
• OS: Windows

Summary
After opening a MATLAB Project (.prj) — either via MATLAB: Open Project... or by typing open('project.prj') in the MATLAB command window — the Workspace panel (workspaceBrowserSidebarView) stops receiving any variable updates. New variables assigned afterward in the base workspace never appear in the panel, even though they genuinely exist (verified by evaluating them directly in the MATLAB terminal).

Steps to Reproduce

  1. Fresh MATLAB session (disconnect/reconnect via MATLAB: Change MATLAB Connection to guarantee a clean state).
  2. Confirm the Workspace panel is live: type testVar1 = 1; in the MATLAB terminal → appears correctly in the panel.
  3. Open a MATLAB Project,
  4. Type testVar2 = 1; in the MATLAB terminal.
  5. Expected: testVar2 appears in the Workspace panel.
  6. Actual: Panel does not update at all — testVar2 never appears, and no further variables update either.
    Isolation performed
    • Confirmed reproducible with the project's registered startup file present.
    • Confirmed reproducible even after stripping the startup file down to trivial fprintf/setenv statements only (ruled out clear, currentProject, gitrepo, sl_refresh_customizations, slCharacterEncoding as the specific trigger).
    • Confirmed reproducible even with the startup file fully unregistered from the project (Project → Details → Startup/Shutdown Files). So the break is tied to the act of opening the project itself, not to any startup/shutdown script content.
    • Confirmed with almost empty project file test.prj
    • Not related to the previously fixed issue #332 (clear followed by long-running op) — that fix is present in 1.3.13 and works correctly for plain scripts; this is a distinct trigger.
    • No errors observed in Developer Tools Console or the Extension Host log during reproduction.
    Workaround
    • Disconnect and reconnect MATLAB (MATLAB: Change MATLAB Connection) after opening the project restores normal Workspace panel updates for the rest of the session (until the project is reopened again).
    Suspected root cause
    The Workspace panel's data-refresh mechanism relies on detecting MATLAB "idle" prompt-change events to re-prime/request data (see WorkspaceBrowserProvider.ts, schedulePrime/requiresPrime). Project loading likely changes MATLAB's busy/idle state transitions in a way the extension doesn't recognize as a normal idle event, so the panel's internal request loop never resumes.

test.prj.txt

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions