Have you ever programmed an ATmega168 with your current setup? The mega168 doesn’t support JTAG; the only available in-circuit debugging interface is debugWire, which works via the reset line, and you would need to modify the 3pi slightly to make it work. Can you explain how you have your programmer connected?
I don’t absolutely need to debug running code on the 3pi. If I can use a simulator to do this, that would be fine. I am looking through the docs for SimulAVR now. If this will work, let me know. If you have a guide for how to use this tool, please let me know.
AVR Studio has a simulator that will let you step through your code and test various conditions. It sounds like this would be more than sufficient for your needs, but, unfortunately, it only runs on Windows. If you want to pursue in-circuit debugging, you will need to use debugWire, which interacts with the ATmega168 via its reset line. To do this, you will need to use a programmer that supports debugWire (our Orangutan USB programmer does not), enable the debugWire fuse, and remove the filter capacitor that is on the 3pi’s reset line. I only recommend using debugWire if you know what you are doing, because once you enable the debugWire fuse, you will only be able to use debugWire to talk to your 3pi (and you will only be able to restore it to its normal ISP-responsive state using debugWire).