Phineas & Ferb characters are shown breaking the 4th wall with surprising regularity... at least, that I've encountered in watching random episodes on YouTube. For instance, in Meapless in Seattle, Phineas's Birthday - Clip-O-Rama!, Mission Marvel, and Make Play, the 4th wall is broken at least once.
In Meapless in Seattle, when Dr. Doofenshmirtz and Meap are falling, they have a conversation about the commercial break.
In Phineas's Birthday - Clip-O-Rama!, Phineas and other characters make several references to 'a clip show'.
In Mission Marvel, Dr. Doofenshmirtz makes a remark about 'I thought that this was going to be a special extended episode'.
In Make Play, Carl says 'it's a cartoon', and then Major Monogram yells at him not to break the 4th wall.
And I also recall some episode where Candace asks Phineas something about 'don't you have a catchprase to say now' and then Phineas delivers a variation of the 'Where's Perry?' line.
There are other examples; these are just a few. (I can find some more if necessary.)
Given that they break the 4th wall fairly often, how aware are they that they are just characters in a TV show?