SWO JLink VScode ESP32

The problem is I had used the Arduino framework in Platformio rather than ESPidf.
Is it possible to include

#include “esp_app_trace.h”
#include “esp_log.h”

in Arduino style programs? And to complete this topic, would you please visit this thread?