I want to debug my ESP32 module which is giving an exception using ESP32 exception decoder, but for that, I would need to have access to my stack trace to paste it. But currently, my arduino serial monitor does not print the stack trace. (as shown below) enter image description here

But I would need stack trace to be printed, like in the below image to debug my exception. How can I print it on the serial monitor? enter image description here

  • I think you will need to have access to the processor's debug port such as JTAG. And likely you will need the particular processor's actual IDE and HW programmer. The Arduino IDE was supposed to be simple and easy to use for learning. But I would be interested to know if there are clever ways to get register and call stack information while only using the Arduino IDE. – st2000 Feb 3 at 13:12
  • The second image is on my friend's setup. He is using Arduino IDE too. Also, there are videos on how to use esp exception stack using Arduino, but I'm not sure how they are getting the stack information. – blazingcannon Feb 3 at 13:22
  • ...I have not used an ESP32 yet. I see what you are talking about. Guessing, your friend has triggered some built in debugging capabilities of the ESP32's Arduino code on the ESP32. Further guessing, if you run your friend's code I bet you will get the same debugging output. Last guess, if this is a SW feature of the ESP32's Arduino code, it may be possible your program breaks in such a way or is running successfully as to not produce the debug information. – st2000 Feb 3 at 13:36

Got the required trace logs at the output. All I had to do was enable PSRAM in tools. enter image description here

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.