How to post logs and code in PlatformIO Community Forum

How to post logs and code in PlatformIO Community Forum

To make your protocol or source code easier to read, please use pre-formatted text (</> icon in the toolbar).

  1. Copy your source code or your protocol.

  2. Then click on the </> icon and paste your code.

Example: Content from a source code file

Without pre-formatted text:

void setup() {
Serial.begin(115200);
Serial.println(“Hello World!”);
}

void loop() {}

Using pre-formatted text:

void setup() {
  Serial.begin(115200);
  Serial.println("Hello World!");
}

void loop() {}

Example: error log

Without pre-formatted text:

src/main.cpp: In function ‘void setup()’:
src/main.cpp:3:5: error: ‘Serial’ was not declared in this scope
Serial.begin(115200);
^~~~~~
*** [.pio\build\esp32dev\src\main.cpp.o] Error 1

Using pre-formatted text:

src/main.cpp: In function 'void setup()':
src/main.cpp:3:5: error: 'Serial' was not declared in this scope
     Serial.begin(115200);
     ^~~~~~
*** [.pio\build\esp32dev\src\main.cpp.o] Error 1

Example: Content from a platformio.ini file

Without pre-formatted text:

[env:esp32dev]
platform = espressif32
framework = arduino
board = esp32dev

Using pre-formatted text:

[env:esp32dev]
platform = espressif32
framework = arduino
board = esp32dev
4 Likes
Circular_queue/circular_queue_mp.h: No such file or directory
PlatformIO OTA on ESP8266
Adding a library to a project deletes all other libraries in that project
Ssl implimentation using at commands in "EC200U" ( using esp32 c3 mini and EC200U )
[SOLVED] ESP32S3-WROOM-1U-N8 custom board no upload and serial communication
Library confusion
Can't upload code to Arduino Uno
Restarting the controller when using sockets in the web server ESP32
Restarting the controller when using sockets in the web server ESP32
The Esp.cpp file cannot be found when platformio compiles
Can't get arduino code to work
The Esp.cpp file cannot be found when platformio compiles
2nd Project with same Dev Board and same display wont compile
How to slove the ports problem while tranferring the code to the esp 32
I handl in the school ardoino ide and we write a code the did work there but it did no work in the platform IO i dont know why can any body help thanks<3
Lolin esp32 s3 mini pro
Problems with Platformio.ini with libraries
How to use 2 i2c channels on stm32f103c8t6 (other than pb6 & pb7) platformio framework arduino
Cannot find Kincony 868-A16 V3.1 board in PlatformIO board list - ESP32-S3 configuration help needed
Watchdog trips in async_tcp
Circular_queue/circular_queue_mp.h: No such file or directory
ESP32 Runs only when compiled on M1 MAC
Fatal error: Arduino.h: No such file or directory
ESP32 code Build problem
Collect2.exe: error: ld returned 1 exit status * [.pio\build\uno\firmware.elf] Error 1
Cannot upload program on stm32 using stlink-v2
Platformio Unable to compile or upload for esp01 esp8266
Noob Can't Install It In VSCode
Authentication issue during OTA upload with PlatformIO (ESP32)
ESP32-S3 Serial Monitor under Linux Not working
Can anyone tell me what is the problem?
Can anyone tell me what is the problem?
PlatformIO on CLion for STM32Cube
Seeed Studio ESP32-3C debugging requires esp-prog?
HTTPClientError while building PlatformIO
STM32F103ZET6程序烧录后,程序没有执行,platformio-ini需要添加哪些
Unable to use the latest Firebase library by mobitz
New user needs help with error messages
ESP32 - Testing keeps hanging
Main.cpp:1:10: fatal error: Arduino.h: No such file or directory
Help Needed: Correct PlatformIO Configuration for Custom ESP32-S3 Board with ESP32-S3-WROOM-1-N4R2 (4MB Flash, 2MB PSRAM)
Sudden compile errors on a sketch
Can't return to platformIO after pioarduino installation
ESP32-S3 ETH program does not start under pio ide, but does start under arduino IDE
Undefined references?
MBED TDBStore (init) very slow, better options
Garbage on serial monitor ESP32
Esp32 + tcs34725

Apart from being much more readable when formatted in this way, it prevents “strange” effects in the browser with:

  • Some text lines appearing in massive text for no reason.
  • The Windows backslash character, '\', in filenames, causes the following character to be treated as a control character or omitted from the text altogether.
  • Etc.

Cheers,
Norm.

I can’t find the </> symbol in the tool bar. Am I looking in the wrong place or do I need to install something additional?

It only shows up once you hit the “Reply” Button

Right next to the " symbol

You can also use the keyboard shortcut ctrl+e.