How to see debug logging when running gradle inside IntelliJ?

If I were running Gradle on the command line, I could use the --debug or -d flag to see debug level console logging, and this works fine.

But on IntelliJ, I don’t know if there is a place I can add flags to the Gradle execution when running a Gradle run/debug configuration.

I tried adding a gradle.properties file with the line org.gradle.logging.level=debug, but this did not add debug logging to the the IntelliJ console either.

Edit: the workaround here is a good temporary solutution