MATLAB: How to get parpool to pause at breakpoints

debugparallelParallel Computing Toolboxspmd

When I do "parpool('local',4)" Matlab ignores my breakpoints so that I can't debug my parallel code. This is within an spmd section.

Best Answer

Unfortunately, it is not possible to use the MATLAB debugger to debug code running on workers. The normal workaround is to liberally sprinkle fprintf or disp calls through your code that will be run on the workers. Often this is sufficient to narrow down the problematic portion of code to something you can debug on the client.