I can't quite tell, but I don't think so. I neglected to mention that I am using MPLAB 8. The other thing is, that I need to be able to distinguish between a hardware debugger that is an ICD or RealICE, and the software debugger "SIM". Mostly, I have to use the ICD and real hardware to test things, because the SIM has so many problems. But it would be nice to be able to select SIM as the debugger, and have the compiler automatically compile the right (workaround) code. But, thanks for the reply. It looks like, in the future, MPLAB X may be able to do this. On Mon, Apr 22, 2013 at 8:16 PM, Tamas Rudnai wrote= : > Is this what you are looking for? > > http://microchip.wikidot.com/mplab:debug-macro > > Tamas > > > On 22 April 2013 17:10, Barry Gershenfeld wrote: > > > I'm looking for a macro to know when MPLAB-SIM has been selected... > --=20 http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .