Skip to content

Document remote debugger use  #288

Closed
@SethTisue

Description

@SethTisue

Adriaan wrote this somewhere and I squirreled it away:

Thanks for your interest in digging in here! We use sbt to build and IntelliJ to debug the compiler. I’ve attached a screenshot of how I have IntelliJ debugging set up:
As you can see, we use remote debugging, and launch the compiler from the sbt shell as follows:

> set javaOptions in compiler := List("-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=8002")
[info] Defining compiler/*:javaOptions
[info] The new value will be used by compiler/*:runner, compiler/compile:run::runner and 4 others.
[info] 	Run `last` for details.
[info] Reapplying settings...
[info] *** Welcome to the sbt build definition for Scala! ***
[info] Check README.md for more information.
> scalac -uniqid /Users/adriaan/Library/Preferences/IdeaIC2016.2/scratches/scratch_14.scala
[info] Running scala.tools.nsc.Main -usejavacp -uniqid /Users/adriaan/Library/Preferences/IdeaIC2016.2/scratches/scratch_14.scala
Listening for transport dt_socket at address: 8002

Here, you can launch the debug session as setup in my screenshot.
Happy to help further, though I should add a disclaimer that specialization is a pretty tricky part of the compiler! Good luck!

this should be in the scala/scala repo README. or if it's already documented somewhere else, the README should link to it.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions