Thanks domble, ric, pcbbc.
I modified the title to correct for xc8 and define the PIC.
And I confirm that I tried to add watches and variables with all possibilities:
- selection of variable in the editor then right-click "New Watch";
- in watches or variables window trying to add directly typing the name, or clicking to open the "New watch" window and typing the name -- clicking SFR or Global Symbols -- and the last method right-clicking in watches to select "New Watch".
But what is new:
- when I close MPLABX and reopen ... all the watches I defined are there and disappear when launching debugger;
- I finally am able to add watches if and only if I declare the variables at the beginning of the main function and if I give them a default value. Examples (... is some lines of code):
------ in this example 1 I can get watch for a ---
void main(void) {
unsigned char a=0;
...
}
------ in this example 2, I can't get watches ---
void main(void) {
unsigned char a;
...
a=10;
...
}
------ in this example 3, I can't get watches ---
void main(void) {
...
unsigned char a=10;
...
}
Thanks
Goupil
post edited by goupil35000 - 2019/09/04 09:39:55