Heap Tracing allows tracing of code which allocates/frees memory. More information in heap tracing documentation. Please also review System behaviour analysis for systemView tracing configuration.
Let's open a ESP-IDF project. For this tutorial we will use the system/sysview_tracing_heap_log
example.
-
Click menu View -> Command Palette... and search for the ESP-IDF: Show Examples Projects command and choose
Use current ESP-IDF (/path/to/esp-idf)
. If the user doesn't see the option, please review the setup in Install tutorial. -
A window will be open with a list a projects, go the system section and choose the
sysview_tracing_heap_log
. You will see a Create project using example sysview_tracing_heap_log button in the top and a description of the project below. Click the button and the project will be opened in a new window.
For this example, the project has been already configured for application tracing purposes. For more information please take a look at the Application Level Tracing library documentation.
-
Configure, build and flash your project as explained in the Basic use tutorial.
-
Click the
ESP-IDF Explorer
in the activity bar. On theIDF APP TRACER
section, click theStart heap Trace
. This will execute the extension's openOCD server and send the corresponding tracing commands to generate a tracing log. You can see the generated tracing log in theAPP TRACE ARCHIVES
named withHeap Trace Log #1
. Each time you executeStart heap Trace
a new tracing will be generated and shown in the archives list. You can also start tracing by running the ESP-IDF: App Trace command.
NOTE: The openOCD server output is shown in menu
View
-> Output -> OpenOCD.
NOTE: Make sure that openOCD configuration files are properly configured as described in Debugging tutorial.
- Click on
Heap Trace Log #1
and choose theHeap Tracing
option forIDF Tracing
report window. ClickShow report
button to reload the visualization.
- Click on
Heap Trace Log #1
and choose theSystemView Tracing
option for theESP System View Report
window.