What's the "-Ydebug-error" option in scala 2? it should print every stack traces of each compilation error

81 Views Asked by At

When I'm debugging a complex scala plugin, I sometimes encounter unknown errors, I want the compiler to print out the stacktrace that triggers each error, to make sure that those errors are not caused by my pluin.

In scala 3 this option can be enabled by "-Ydebug-error", but I can't find its counterpart in the latest scala 2.13.7.

How can I enable this option?

2

There are 2 best solutions below

1
Jitendra On

You can check the compiler options and the available verbose settings on the Scala 2 documentation page here : https://docs.scala-lang.org/overviews/compiler-options/index.html#Verbose_Settings

1
Ismail H On

Unfortunatly, I don't think there is one that would do the same thing. It was added in Scala 3 :

Documentation here : https://docs.scala-lang.org/scala3/guides/migration/options-new.html

In Scala 2, the closest option would be -Vissue or -Yissue-debug