News for hackers. Stuff that matters.
Re:What's Stopping Me Using Java8 Lambdas – Try Debugging Them by Bjartr on Sunday January 18, 2015 @12:22AM (#8906740)
I know eclipse lets you jump up and down stack frames during debugging, I assume IDEA lets you do the same. So, while inconvenient, couldn't you jump up to the calling frame and inspect the variable in question from its scope?
Re:What's Stopping Me Using Java8 Lambdas – Try Debugging Them by ts4z on Sunday January 18, 2015 @12:49AM (#8906790)
There's no guarantee the method that created the lambda is still on the stack. If a method returns a callback, the method that created the lambda has returned before the lambda is called.
Re:What's Stopping Me Using Java8 Lambdas – Try Debugging Them by organsnyder on Sunday January 18, 2015 @05:32AM (#8907189)
But wouldn't the stacktrace still include the file and line number where the lambda was created? Yes, you can't easily trace the code path between the creation of the lambda to its execution, but that strikes me as no different than debugging any other issue with bad data.
Re:What's Stopping Me Using Java8 Lambdas – Try Debugging Them by alex_duf on Sunday January 18, 2015 @12:49AM (#8906788)
Yep, I confirm, intelliJ does know how to do that. I don't understand the rant either, so I'm going to assume he doesn't know how to use the stack on the bottom left of the debugger.