How to get task info in the ESP32 scope?

I’m trying to get the task information for debugging purposes.

I found that the vTaskGetInfo is not declared in the ESP32 scope. Does anyone know the reason? Also, if the function is not declared in the ESP32 scope, how could I can get the task info?

Many thanks.

Per xTaskGetHandle is not available to be used · Issue #4746 · espressif/arduino-esp32 · GitHub the function is not available because they haven’t enabled it in the FreeRTOS config. It’s up to the Arduino-ESP32 people to make this work by default in Arduino-ESP32.

With PlatformIO it is possible to compile Arduino-ESP32 but with a reconfigurable ESP-IDF base (example: espidf-arduino-blink. There, the function could be activated to make it usable. You should however wait until PlatformIO updates support for the latest Arduino-ESP32 2.0.0 version (v3.3.2 Does not compile with Arduino · Issue #616 · platformio/platform-espressif32 · GitHub)