Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Don't forget about "Reset Frame". When you're manually stepping over something and accidentally go too far, this will take you back to the previous stack frame so you can try again.


A winning combination with control-shift-f9 to recompile the function body and then drop-frame to retry with the new code

I have lost hope for DCEVM being upstreamed to allow structural changes to the class :-(


Dcevm is regularly released from JetBrains as part of their JDK. https://github.com/JetBrains/JetBrainsRuntime

Also with 'Java on Truffle' on GraalVM you can use enhanced class reloading https://www.graalvm.org/latest/reference-manual/java-on-truf...

I think hot code reloading did not look that good in a very long time.


Apologies, I didn't mean to imply DCEVM went poof, just that I was sad it didn't make it into OpenJDK so one need not do JDK silliness between the production one and the "debugging one" since my experience is that's an absolutely stellar way to produce Heisenbugs

And I'll be straight: Graal scares me 'cause Oracle but I just checked and it looks to the casual observer that it's straight-up GPLv2 now so maybe my fears need revisiting: https://github.com/oracle/graal/blob/vm-23.1.0/LICENSE


Sorry, what?!? I did not know what this does. Thank you.


I find this to be one of the most useful tools in debugging.

For example, if an exception is being logged in some random location (but poorly) I can throw a breakpoint on the log message, pop up several stack frames, look at the inputs into those frames (what are all the local variables) and replay down to whatever level I want or what other breakpoint I want to hit.

The only catch is if your functions are mutating input data (or some shared state somewhere), then you could be looking at different executions from one stack to the next.

One more reason to prefer pure functions over side-effects.


Thank you!




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: