[null, {"document_url": "http://microchipdeveloper.com/mplabx:show-all-some-local-variables", "unformatted_src": "http://microchip.wikidot.com/local--files/mplabx:show-all-some-local-variables/Scope.png", "src": "http://microchip.wikidot.com/local--files/mplabx:show-all-some-local-variables/Scope.png", "formatted_filename": "Scope", "alt_text": "Scope.png"}, null, {"document_url": "http://microchipdeveloper.com/mplabx:show-all-some-local-variables", "unformatted_src": "http://microchip.wikidot.com/local--files/mplabx:show-all-some-local-variables/CurlyBraces.png", "src": "http://microchip.wikidot.com/local--files/mplabx:show-all-some-local-variables/CurlyBraces.png", "formatted_filename": "CurlyBraces", "alt_text": "CurlyBraces.png"}, null, null, {"document_url": "http://microchipdeveloper.com/mplabx:show-all-some-local-variables", "unformatted_src": "http://microchip.wikidot.com/local--files/mplabx:show-all-some-local-variables/CurlyBraces.png", "src": "http://microchip.wikidot.com/local--files/mplabx:show-all-some-local-variables/CurlyBraces.png", "formatted_filename": "CurlyBraces", "alt_text": "CurlyBraces.png"}, null, {"document_url": "http://microchipdeveloper.com/mplabx:show-all-some-local-variables", "unformatted_src": "https://microchip.wikidot.com/local--files/mplabx:show-all-some-local-variables/All_local.png", "src": "https://microchip.wikidot.com/local--files/mplabx:show-all-some-local-variables/All_local.png", "formatted_filename": "All local", "alt_text": "All_local.png", "rendered_width": "100%", "rendered_height": "100%"}, null, {"document_url": "http://microchipdeveloper.com/mplabx:show-all-some-local-variables", "unformatted_src": "http://microchip.wikidot.com/local--files/mplabx:show-all-some-local-variables/CurlyBraces.png", "src": "http://microchip.wikidot.com/local--files/mplabx:show-all-some-local-variables/CurlyBraces.png", "formatted_filename": "CurlyBraces", "alt_text": "CurlyBraces.png"}, null, null, {"document_url": "http://microchipdeveloper.com/mplabx:show-all-some-local-variables", "unformatted_src": "https://microchip.wikidot.com/local--files/mplabx:show-all-some-local-variables/Near_locals.png", "src": "https://microchip.wikidot.com/local--files/mplabx:show-all-some-local-variables/Near_locals.png", "formatted_filename": "Near locals", "alt_text": "Near_locals.png", "rendered_width": "100%", "rendered_height": "100%"}, null]
Show All/Selected Local Variables The icon on the top left-hand side of the Variables window controls which variables are displayed. When in the form of open curly braces , it will show all local variables in scope of the function you are currently debugging. If you click on it, it will change to look like the Focus Cursor at PC icon . This provides a hyper focus of the variables in the immediate area of where you are stepping and where the cursor is located. In this form, it will only show local variables on the exact line the cursor is on, as well as on the line before.


Accessing ALL Local Variables

The upper left icon in the Variables window controls the range of local variables being displayed. Clicking on this icon will toggle the window from displaying all the local variables in a particular function, or a specific range of variables. When the icon displays a set of curly braces " ", all the local variables within the scope of the current function will be displayed. The image below shows this icon set to display all the local variables in the function. The debug session must be paused within a function in order to see the local variables with just the Variables window. Please note the green bar is paused within the function foo() in the image on the right.

Accessing Local Variables At PC Level And Line Above

Occasionally you will find too many variables within the current frame to easily view. The Variables window allows you to view the variables "near" the current Program Counter location. By near, it is meant that you can view any local variable in the line pointed to by the Program Counter and the line immediately before it. This will allow you to set breakpoints and see just the local variables' values as they are accessed by the program. To set the Variables window to display only variables near the program counter, push the top most control icon until it displays a left-to-right green arrow