How to add --verbose to platformio.ini?

Hi, Is there anyway to add the verbose in platformio.ini?
Best regards.

Yes, see pio settings — PlatformIO latest documentation

Thanks a lot @ivankravets
But I tried many times, such as “build_flag=verbose”, “force_verbose=yes”, “output=verbose”,etc. All of them are failed.
Can you give me an example about how to use “verbose” in the platformio.ini file?

By the way, If I want to let the platformio project generate the “main.c” file, not the “main.cpp” file, when creating the avr-arduino project in the project creating wizard (I will delete the “framework=arduino” in platformio.ini file for native avr programming), is there anyway to do it? I find that some functions have errors in “.cpp” file, but the errors disappeared if I just modify the “main.cpp” to “main.c” manually.
Best regards.

2 Likes

After many attempts, I find that there is a command line in the “TERMINAL” tab:
Snipaste_2020-09-29_20-35-58

And the “Verbose Build”:
Snipaste_2020-09-29_20-20-27

Hope this information helps the beginners who needed.

5 Likes

That does not seem to be working as one would expect. At least not when using VS Code with platformio.

When you set:
force_verbose = yes

And you then compile, you still get a message that you can user "–verbose"for verbose output. And your compile still isn’t verbose. So that setting has no effect on compile output.

The screenshots of @wgt do work (aka, click Verbose Build in platformio itself).

It would be really helpful (and much more intuitive) if force_verbose = yes would effectively do a verbose build too.

Edit
I’m wrong… kind of.

When one does: pio settings set force_verbose 1 then it does work as expected.
I have no clue where this setting is supposed to be stored in config files. It definitely doesn’t work in your project settings platformio.ini.

It also doesn’t work if one does:

[platformio]
force_verbose = yes

… I know how to get it working now (executing that pio command) but i find it super vague and magic that it does work now.

1 Like

The correct way to do this is to use -v or --verbose in the build flags inside platform.ini file like this: build_flags = -v

4 Likes