Gangnus
Gangnus

Reputation: 24464

Into what options have I to put the --stacktrace for Gradle if it is NOT an Android project?

Soon after starting a task I have got a message:

Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

Yes, there are two discussions here about how I can do it in command line, thank you. I am using IDE not for returning back to command line constantly. There should be some possibilities how to set that options in the settings for Run or for Project. But I cannot find any.

I can go to Gradle-Android compiler and nicely set --stacktrace there. Several posts on SO describe that in variations. But my project is not Android. And on the settings page is written:

These settings are used for compiling Gradle-based Android projects.

There are interesting pages in:

 File-Settings-Build...-Compiler, 
      User-Local ... VM options
 File-Settings-Build...-Compiler-Java Compiler-
      Additionals command line parameters
 Run-Edit-Gradle-*task*-
      VM options
      Script parameters

I can't put --stacktrace in VM parameters, it is an error. Maybe it is possible with some special syntax?

Where and what to set?

Upvotes: 1

Views: 4838

Answers (2)

Abhishek Kumar
Abhishek Kumar

Reputation: 694

For intellij Idea 2021.1.2:

  1. Run -> Edit Configurations... -> /select your test/

  2. Arguments filed should have something like --tests "e2eflow.StatsTest.testName"

  3. Add --debug or --stacktrace at the end of it

Upvotes: 3

Gangnus
Gangnus

Reputation: 24464

This should be used for setting:

Run-Edit-Gradle-*task*-
  Script parameters

Both --stacktrace and --debug work there

Upvotes: 1

Related Questions