You could write the code this way:
int resetOnError = 1;
void errorHandler(void) {
if (error) {
asm(" ESTOP_1");
if (resetOnError) {
logError(error);
reset();
}
}
}
In this way the code would break if the debugger were attached; otherwise the breakpoint would be ignored. In the debugger, you could change 'resetOnError' to zero before continuing execution.
Regards,
Bill