I find debugging very difficult in Mathematica, perhaps because I am unfamiliar with the appropriate tools. Ideally, I would like a "break on error" like Matlab with step control, however for the meantime let me be more specific.
When an error occurs, I can click the little red box with three dots and obtain a stack trace which is helpful in identifying in which function/location the error occurred. In parallel execution this little box doesn't appear, I only get the error message and the kernel id. How can I print out the function stack trace in parallel execution to provide a similar granularity of detail as to where the error occurred?
Stack[]and use it in the message handler to collect information about the kernel state at the time of the message. You'd need to do this on the subkernels, as their state is separate from that of the main kernel. $\endgroup$