in reply to Using perl debugger with fork

The simplest solution (one not requiring debugger finagling or arcane ptyery) would be to arrange (or rearrange, as the case may be) your code so that the different paths can be executed and tested in isolation.