The key to understanding why a program is having problems lies in the underlying data. Sometimes it’s a lost pointer and sometimes something as simple as a misplaced bracket. Regardless, the key to solving the problem is to be able to view the data efficiently. Enter Listwindows – a row-based view concept that shows you everything you’ll ever need and more. With Listwindows, you as a VS Code user will now be able to visually examine and understand
Two core parts of embedded development are memory management and security, where the latter is becoming increasingly important in a connected world. So let us show you how to use a couple of Listwindows to help manage your embedded device's memory and security.
The register view provides valuable insight into the different registers of the device. Altered values are shown in red and the view format for each register is simply changed from the context menu. Use the “Register User Groups Setup” view to create customized sets of registers that suit your needs or use one of the predefined ones to navigate between segments.
Symbolic memory helps you search and work with the memory. The “GO TO” function allows you to search for variables using their name or address to provide both type, value and location. A value can also be altered by simply clicking on the value column and entering a new value.
When it comes to the security aspects, code coverage is an efficient way to ensure that all your code is executed and tested. The concept is simple, check that each instruction is executed at least once, which helps avoid any unpleasant surprises later. To enable Code Coverage, open the IAR Trace in the bottom panel and simply click the enable button in the toolbar for Code Coverage and ensure that trace is enabled. When running on hardware, use the ETM Trace for highest accuracy. The Code Coverage view will continuously list the percentage of instructions covered, with the context ranging from per program down to per branch in an if-clause.
Another useful feature is to double-click the trace view to enable “browse mode”. Browse mode allows you to click a trace entry and the corresponding line of code is shown in the editor.
With the large number of Listwindows available to you, it’s important to use the available screen space as efficiently as possible. To give you easy access to the information you need, you can opt to hide Listwindows you are not interested in or move Listwindows to a place with more available space.
To hide or unhide Listwindows, first right click the title of Listwindows. In the context menu, you will see a list of the available windows in that view, with a checkmark next to the windows that are currently visible. To toggle the visibility of Listwindows, simply press its entry in this context menu.
Listwindows can be moved around the user interface by clicking on and dragging its title, then dropping it in its new position. We recommend that you move some of your favorite Listwindows to VS Code’s Secondary Side Panel for easy access; simply drag the Listwindows to the right side of the screen until the Secondary Side Panel appears. Listwindows can also be moved to any of the tabs in the bottom panel, or be given its own tab in the bottom panel. You can take advantage of this by, for example, placing Listwindows next to the debug console, or moving one of the Trace, Profiling or Code Coverage windows out into its own tab.
All in all, Listwindows are what elevate C-SPY from just a VS Code debugger to being THE VS Code debugger. Visualization is king when it comes to working with complex data and Listwindows is the tool to use. Whether it’s the value of a specific register or understanding the effects of a single instruction, our VS Code extensions allow you to do your job as efficiently as possible.
If we’ve captured your curiosity, don’t wait—download the IAR Embedded Workbench and install the latest extensions from the Visual Studio Marketplace.
Want to see these features in action? Watch the video and discover how they can revolutionize your debugging workflow.