Ezh
unread,Jun 23, 2012, 11:05:15 AM6/23/12Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to simple-b...@googlegroups.com
For example, trivial situation, I add this to sbt plugin:
val key = AttributeKey[Int]("load-count")
val onLoadHook = (s: State) => {
val previous = s get key getOrElse 0
System.err.println("Project load count: " + previous)
s.put(key, previous + 1)
s.addExitHook(() => { System.err.print("!!!!!!!!!") })
}
onLoad in Global ~= (onLoadHook compose _)
I saw "Project load count: ...", but lost "!!!!!!!!!" output.
How to find the reason why addExitHook not working? I suspect that it must more simple than recompile sbt every time with huge System.err.print messages.
What is the best practice of sbt debug in general? Wiki hasn't such information.
Please without logLevel := ... pack of useless trace messages isn't a solution especially against interactive debugging. What you use to handle such issues?