/prefuse-type-debugger

Type debugger that is using logging infrastructure of the scala compiler to gather information and prefuse library for UI.

Primary LanguageScala

##########################################################
               THE SCALA TYPE DEBUGGER
##########################################################
Work in progress on Scala Type Debugger using Prefuse for
convenient UI.

Dependencies:
 - latest scala with instrumenting support
 - prefuse library

Both available in my repositories. You will also need sbt for convenient compiling of type debugger.

How to start (the hard way, from scratch):
1) build scala with instrumenting support ('topic/events-instrumenting' branch),
   in all other steps we assume that $SCALA_INSTRUMENTING_HOME to its directory
2) define local.properties with the following line: scala.instrumented.home=$SCALA_INSTRUMENTING_HOME/build/pack
4) sbt pull-latest-prefuse-binary
5) sbt compile
5.1) sbt run-type-debugger file1 file2 ...
or 
5.1a) export PATH=$SCALA_INSTRUMENTING_HOME/build/pack/bin:$PATH
5.1b) scala -cp resources/lib/prefuse-core-0.21-latest.jar:target/scala-2.11.0-SNAPSHOT/classes scala.typedebugger.TypeDebuggerUI resources/code/src/A.scala

or (use the latest snapshots)

Pull latest snaphots using
1) sbt pull-latest-scala-binary
2) sbt pull-latest-prefuse-binary
3) sbt pull-latest-debugger-binary

This will put all the necessary jars (that are in sync) into resource/lib and you can just run it with

java -Xbootclasspath/a:resources/lib/scala-library-latest.jar:resources/lib/scala-compiler-latest.jar:resources/lib/scala-reflect-latest.jar scala.tools.nsc.MainGenericRunner -classpath resources/lib/prefuse-core-latest.jar:resources/lib/type-debugger-latest.jar scala.typedebugger.TypeDebuggerUI resources/code/src/paper/Example01.scala