Use Parallel Toolbox to debug multiple scripts

4 views (last 30 days)
I have two different scripts that I would like to debug simultaneously so I can compare their behavior. Is there a way I can use the Parallel Computing Toolbox to do this? The only way I've thought of is opening two separate instances of Matlab and debugging one script in each.

Answers (1)

Harsha Medikonda
Harsha Medikonda on 17 Aug 2015
Hi David,
I understand that you wish to know if Parallel Computing Toolbox can be used for debugging two MATLAB files simultaneously in the same MATLAB session.
For profiling parallel code or simply MATLAB code you can use the "profile" function. It is not possible to debug two functions simultaneously with or without using the Parallel Computing Toolbox in the same session of MATLAB. Using the Parallel Computing Toolbox, it will complain if you are trying to open a parallel pool twice. In MATLAB, it does not allow simultaneous execution, you need to wait until one is complete. The best way is to use the "profile" command, which will generate a report that you can use to compare the performance of both the scripts/functions or use two sessions of MATLAB. Please refer to the following documentation links for the usage of "profile" function.
Thanks!
Harsha

Categories

Find more on Performance and Memory in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!