需要在platofmrio.ini中增加两个配置
monitor_filters = esp32_exception_decoder
build_type = debug
如果是esp8266的话改成
monitor_filters = esp8266_exception_decoder
build_type = debug
然后就可以了,在serial monitor里面可以看到原本的打印内容是这样的
会变成这样
记得要重新上传程序
上传时有LOG显示 Building in debug mode
,打开串口时显示esp32_exception_decoder