Print a stack trace when attaching fails.