How to install the Scala debugger CLI.
As the CLI uses the Scala debugger API, you need to have tools.jar
available
(provided by Oracle's JDK and OpenJDK). This is typically as simple as
installing the JDK on your system.
At runtime, the Scala debugger CLI will attempt to load tools.jar
from a
variety of locations including JDK_HOME
, JAVA_HOME
, and the system
property java.home
. If the Scala debugger API has issues loading tools.jar
,
you should set either JDK_HOME
or JAVA_HOME
to the path to your JDK.
See the Scala debugger API prerequisites section for more information on finding your JDK path.
The Scala debugger CLI has fat jars hosted on Github, built against Scala 2.10, 2.11, and 2.12. You can find a link to the latest release of the CLI here:
The CLI can debug code independently of the version of Scala that it is built against; so, pick whichever binary you prefer.
-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005
java -jar <YOUR_CLI_BINARY>.jar
attach 5005
threads