After the sketch is succesfully compiled and uploaded to the Arduino memory, in order to start debug, you should open Arduino IDE Serial Monitor (Tools menu), then select communication baud rate that in the sketch is used.
Then you will see information about current breakpoint in Serial Monitor window:
<0> counters watch
0158 count 0001 ".."
015A lcoun 00000001 "...."
0140 text "Debug"
0025 PORTB 00 "."
Enter command N and press Enter key or push Send button, in order to send it to Arduino.
<1> text watch
0158 count 0001 ".."
015A lcoun 00000001 "...."
0140 text "Example"
0025 PORTB 00 "."
Now it is clear what debugger displays. At the first string it displays breakpoint count number. Then it displays the dump of watched variables in format: variable address, symbolic label, hexdecimal value and the value as ASCII characters. For string variables the value is out as ASCII-text.
Now let's watch the memory at the address of text variable, by sending M140 command. The debugger will dump the memory, starting from address 0140:
Memory dump: RAM
0140 27 01 00 00 08 00 00 00 00 00 43 16 76 14 8F 14 '.........C.v...
0150 E3 15 10 16 F6 15 32 16 01 00 01 00 00 00 40 01 ......2.......@.
0160 03 03 04 00 58 01 5A 01 40 01 25 00 00 00 00 00 ....X.Z.@.%.....
0170 00 00 00 00 63 6F 75 6E 74 6C 63 6F 75 6E 74 65 ....countlcounte
0180 78 74 00 50 4F 52 54 42 00 00 00 00 00 00 00 00 xt.PORTB........
0190 00 00 00 00 00 00 00 00 00 00 00 00 01 03 FF 00 ................
01A0 00 00 00 00 02 00 01 00 00 6E 6D 31 34 30 30 00 .........nm1400.
01B0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
01C0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
01D0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
01E0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
01F0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0200 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0210 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0220 00 00 00 00 00 00 00 00 00 06 00 05 00 4A 01 A9 .............J..
0230 01 C5 00 C4 00 C0 00 C1 00 C6 00 04 03 07 05 01 ................
Since the text variable type is pointer to char-type characters array, its value 0127 is the address of string to which text variable is pointing at the moment. Let's display another dump, using M127 command.
Memory dump: RAM
0127 45 78 61 6D 70 6C 65 00 44 65 62 75 67 00 74 65 Example.Debug.te
0137 78 74 20 77 61 74 63 68 00 27 01 00 00 00 00 00 xt watch.'......
0147 00 00 00 43 16 76 14 8F 14 E3 15 10 16 F6 15 32 ...C.v.........2
0157 16 01 00 01 00 00 00 27 01 03 03 04 00 58 01 5A .......'.....X.Z
0167 01 40 01 25 00 00 00 00 00 00 00 00 00 63 6F 75 .@.%.........cou
0177 6E 74 6C 63 6F 75 6E 74 65 78 74 00 50 4F 52 54 ntlcountext.PORT
0187 42 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 B...............
0197 00 00 00 00 00 01 03 FF 00 00 00 00 00 02 00 01 ................
01A7 00 00 6E 6D 31 34 30 30 6D 31 32 37 00 00 00 00 ..nm1400m127....
01B7 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
01C7 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
01D7 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
01E7 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
01F7 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0207 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0217 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
Now let's display the watchlist again with command W:
0158 count 0001 ".."
015A lcoun 00000001 "...."
0140 text "Example"
0025 PORTB 00 "."
Everything is correct, string constant "Example" is stored at the RAM by address 0127, to which text variable is pointing at the moment.
Let's run the sketch with command G. Then stop it with either S or N.
<2> text watch
0158 count 2D22 ""-"
015A lcoun 00022D22 ""-.."
0140 text "Debug"
0025 PORTB 20 " "
Values of counters are both equal at low 16 bits. By high 16 bits of lcount counter we can see that the count counter became zero several times already. In my case it is 2 times.
Also text variable points to the "Debug" value, and PORTB register is equal to 0x20, that means bit 5 is logical one, so the LED should lit at the moment. I look to Arduino - so it does, it lits.
I send command N.
<3> counters watch
0158 count 2D23 "#-"
015A lcoun 00022D23 "#-.."
0140 text "Debug"
0025 PORTB 00 "."
PORTB register became zero again. The LED is switched off.