Skip to content

VS Code workspace folders not correctly added to path on Mac #216

@dklilley

Description

@dklilley

Describe the bug
This was reported in #204.

It appears that this issue is specific to Mac. When the extension is attempting to cd and addpath the user's workspace folders, these operations are erroring due to the paths not correctly being split. The matlabLog errors look similar to the following:

Error during `cd` operation:
Unable to change current folder to '/Users/<usr>/dev/project/Users/<usr>/dev/project' (Name is nonexistent or not a folder).
[�Warning: Name is nonexistent or not a directory:
/Users/<usr>/dev/project/Users/<usr>/dev/project]�
[�> In path (line 109)
In addpath>doPathAddition (line 126)

To Reproduce
Steps to reproduce the behavior:

  1. On Mac, set up a VS Code workspace with multiple folders
  2. Connect to MATLAB

Expected behavior
The user's workspace folders should be added to the path without error.

Useful Information
This is pulled from #204:

  • MATLAB version: R2024b Update 3 (24.2.0.2803551)
  • OS Version: macOS 15.2 (24C101)
  • VS Code Version: Version: 1.96.3

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