Skip to content

MATLAB Service Crashes when disconnecting from MATLAB/quitting VS Code #308

@yismailsaadelgedawy

Description

@yismailsaadelgedawy

Describe the bug
Upon trying to disconnect from MATLAB, either by by doing so manually in VS Code, or upon quitting VS Code via cmd+q or shutting down the PC, the MATLAB Service crashes and a MathWorks Crash Reporter window pops up, and the MATLAB instance persists for a while. If this occurs, it actually prevents my PC from shutting down!

To Reproduce
Steps to reproduce the behavior:

  1. Open VS Code on a .m file
  2. Wait until VS Code establishes a connection with MATLAB
  3. cmd+q to quit VS Code (or disconnect from MATLAB manually)
  4. You will see the crash window pop up

Expected behavior
For the MATLAB service/instance to be terminated gracefully/normally, just as if you had MATLAB opened natively and you press cmd+q or close the window via the red Close Button 🔴

Screenshots

Image

(Fig. 1 - Activity monitor before connecting to MATLAB via VS Code)

Image

(Fig. 2 - Activity monitor after connecting to MATLAB via VS Code)

Image Image

(Fig. 3 - Activity monitor after disconnecting from MATLAB, showing instance persistence and MathWorks Crash Reporter)

Image

(Fig. 4 - Elaborating on manual MATLAB disconnection without terminating VS Code itself)

Useful Information

  • MATLAB Version: 25.1.0.2973910 (R2025a) Update 1
  • OS Version: macOS, 15.6.1, 24G90
  • VS Code Version: 1.109.3, arm64

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