I used PlatformIO Home to modify the project configuration. It removed most of the comments in platformio.ini and added some. Instead of reverting these - admittedly unnecessary - changes, I suggest to accept those. This way PlatformIO Home can be used in future without the need to revert the changes to comments every time.
Remove unnecessary entries
I took advantage of the situation and removed configuration statements which were set to default values or did not have any effect. This reduces the size of the file and - hopefully - the maintenance effort.
Add filter for debugging
For debugging runtime exceptions reading the backtrace can be helpful. In order to understand the backtrace which is written by the framework to the serial port, a backtrace decoder can be used. I added a filter to the ESP32 environment which handles this.
For this to work, do not forget to build in debug-mode. For example in PlatformIO IDE, select as project task 'Advanced' → 'Pre-Debug'. See also here. Also this only works as long as the serial output is read by PlatformIO.
To decode backtraces from the Wokwi serial monitor, one can use this python script.
We have agreed, that most changes shall not be applied.
Our comments shall be retained. They are generally useful. Too bad that PlatformIO deletes them (see platformio/platformio-core#3862). Using that tool requires to revert the deletion of comments.
some options may be relevant or will be soon
I will rebase the remaining useful changes and create a new pull request.
Using the GUI
I used PlatformIO Home to modify the project configuration. It removed most of the comments in
platformio.ini
and added some. Instead of reverting these - admittedly unnecessary - changes, I suggest to accept those. This way PlatformIO Home can be used in future without the need to revert the changes to comments every time.Remove unnecessary entries
I took advantage of the situation and removed configuration statements which were set to default values or did not have any effect. This reduces the size of the file and - hopefully - the maintenance effort.
Add filter for debugging
For debugging runtime exceptions reading the backtrace can be helpful. In order to understand the backtrace which is written by the framework to the serial port, a backtrace decoder can be used. I added a filter to the ESP32 environment which handles this.
For this to work, do not forget to build in debug-mode. For example in PlatformIO IDE, select as project task 'Advanced' → 'Pre-Debug'. See also here. Also this only works as long as the serial output is read by PlatformIO.
To decode backtraces from the Wokwi serial monitor, one can use this python script.