Skip to content

shwetanks/jspy

 
 

Repository files navigation

spy

A simple java trace utility

Requirements

  1. Lein 1 or 2
  2. JDK 1.6

Usage

  • Checkout into a directory (say spy)

  • Start repl (in the shell): spy$ bin/lein repl or lein repl

    This is assuming remote debug session is already started with jvm args -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=<port-number>

  • Server is started on port 8585, connect to http://localhost:8585

  • Fill in the port number and click on attach

  • To see the trace click on detach

  • Exit with Ctrl-C

License

Copyright (C) 2011 BMLs
Distributed under the Eclipse Public License, the same as Clojure.

Under the hood

Depends on java debug, captures all the method entry and exit events and creates a tree out of it.

Troubleshooting

  1. If http port 8585 is already bound to some other process, change the port in spy.clj at the last line
  2. If JAVA_HOME is not set, edit tools-home in project.clj

About

a simple java trace utility

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 74.5%
  • Clojure 12.1%
  • CSS 7.0%
  • Shell 3.5%
  • HTML 2.3%
  • Java 0.6%