Here's one way: http://www.picbasic.co.uk/forum/showthread.php?t=365

MPSIM with breakpoints & the stopwatch is another.