Hello Diego,
I suspect that the pullup resistor required for BDM operation should not affect the comparator output too much, but you would need to check that the comparator output low state is at satisfactory voltage level. I was more concerned that the BDM signal would fluctuate the comparator threshold. during debug, and affect your testing.
In my previous post, I was alluding to whether you could do useful testing without the extra hysteresis on the comparator. Obviously, for normal operation the hysteresis would be present.
Another possibility might be to construct a "jig" specifically for test and debug purposes, and use an external comparator, with suitable hysteresis, for your test signal. The output of the external comparator would be fed directly to the input of the internal comparator. Under these test conditions, the feedback resistor for the internal comparator would probably not need to be disconnected during debug.
Regards,
Mac