strace’ing a Clojure process under lein

Today I wanted to strace a JVM subprocess and then exits, and I discovered a minor roadblock: It was a Clojure program being run using the Leiningen build tool. lein run

  • Add a strace profile to ~/.lein/profiles.clj to call that instead of java directly. If you don't have any profiles already, the file might end up looking like this:
    
    #!/bin/bash
    
    strace -f -o lein-strace.out in the current directory and see what turned up!
  • Thanks to ridcully in the #clojure IRC channel on freenode for reminding me to use the -f option (trace forked subprocesses too!)

    No comments yet. Feed icon

    Self-service commenting is not yet reimplemented after the Wordpress migration, sorry! For now, you can respond by email; please indicate whether you're OK with having your response posted publicly (and if so, under what name).