> MPLAB 5.61, using Microchip's own ICD, and the CCS-C compiler. > > MPLAB is well known for its quirks, like the window-focus thing, > but this one has me stumped. Some time ago I discovered to my > delight that I could right-click on a line of C source code > and choose "Run to here". This is very convenient, especially > where there aren't many labels available to otherwise set a > breakpoint on. > > In one project, this works fine. In another project, it will > not work! Same hardware, same IDE, just select a different > project, and try to use it. In fact, one > program began life as the other, so many setup things like > the #fuses, the device include, are the same. But something > is different! I don't know anything about using MPLAB with C, but it seems possible that some lines don't generate any instructions, or at least the instructions aren't tagged to that line. In such cases, I could imagine how it would not know where to insert the breakpoint. MPLAB doesn't know how to deal with MPASM source that is a macro call, for example. You can't step into or step over a macro (rather annoying). A similar mechanism might be going on here. I always single step with the program memory window having the focus. That seems to work reliably. Unfortunately you sometimes have to manually switch to a different source file as you go in and out of modules. ***************************************************************** Embed Inc, embedded system specialists in Littleton Massachusetts (978) 742-9014, http://www.embedinc.com -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.