Lost feature ... MATLAB Path update upon setting breakpoint

2 ビュー (過去 30 日間)
Dan
Dan 2020 年 1 月 20 日
回答済み: Sai Bhargav Avula 2020 年 3 月 27 日
In an older version of MATLAB, it used to be the case that upon setting a breakpoint in a file which was not on the path, the user would be prompted to add the containing directory to the path. That no longer seems to be the case ... I did not track down exactly in which version this capability was lost.
Does anyone know how to recover this capability? I can't seem to be able to find anything in the settings of MATLAB.
  2 件のコメント
Andrew Janke
Andrew Janke 2020 年 1 月 31 日
Looks like this is gone. Time to hassle support@mathworks.com. :)
Dan
Dan 2020 年 1 月 31 日
Submitted service request ...

サインインしてコメントする。

回答 (1 件)

Sai Bhargav Avula
Sai Bhargav Avula 2020 年 3 月 27 日
Hi,
This was an intended change in behavior for 14b to allow users to create accurate breakpoints without needing the file to be on the path.
To change the directory to a given file, use the feature designed expressly for that purpose: right-clicking on the file's tab and selecting "Change Current Folder".
You can also add the file to the path, rather than (or in addition to) setting a breakpoint, by right-clicking the tab with the file name in the Editor and selecting "Add <foldername> to Search Path" . This operation will put the file's folder onto the top of the MATLAB path.
Finally, you can programatically create a script that will add the necessary folders to the path with the "addpath" command and execute this script before debugging your code
Hope this helps!

カテゴリ

Help Center および File ExchangeStartup and Shutdown についてさらに検索

製品


リリース

R2017a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by