In a normal window i can put the breakpoint wherever i need to but in debug window why my scope gets limited?Please help,i am new to keil.
1. Do always share the product (MDK, PK51,...) and version in use when reporting such a request
2. If possible migrate to the latest versions available
www.keil.com/.../
3. Make sure that Browse Information is selected, as explained i.e. at:
https://www.keil.com/support/docs/1205.htm
4. Rebuild your project
Related: "Cannot set breakpoints or step through C/C++ code"
www.keil.com/.../3902.htm
and another:
5. Understand compiler optimisation.
https://www.avrfreaks.net/forum/tutcoptimization-and-importance-volatile-gcc
(while that focuses on AVR-GCC, the principles are general).
EDIT
Also: https://www.avrfreaks.net/forum/shortcuts-taken-optimized-code-may-occasionally-sic-be-surprising