News for hackers. Stuff that matters.
Re:New React DevTools by SzamarCsacsi on Friday August 16, 2019 @03:17AM (#20712859)
Time-travel debugging is miles better than the old way of placing breakpoints. For me, debugging with breakpoints was always a pain. I often skipped through stuff accidentally and had to start all over again from the beginning, or accidentally went inside some third-party library code that I did not intend to, or placed the breakpoint at the wrong spot. It was just slow and inconvenient, unlike React DevTools where you can see every change and step forward or backward, replay events and observe the state at various points without having to put watchers on every variable / expression.
Re:New React DevTools by true_religion on Friday August 16, 2019 @05:51AM (#20713578)
Time travel debugging is Redux devtools, not React devtools.
Re:New React DevTools by SzamarCsacsi on Friday August 16, 2019 @06:42AM (#20713793)
Oh, you're right. Been working with Vue lately where the component and Vuex inspectors are packaged into one devtools, that's why I got confused.
Re:New React DevTools by tigershark on Friday August 16, 2019 @07:53AM (#20714190)
You can return back to the previous statements in any decent debugger instead of starting from scratch. And by default they don’t go inside third party libraries unless you specify that it’s what you want. What kind of debuggers were you using?
Re:New React DevTools by oauea on Friday August 16, 2019 @08:24AM (#20714414)
> You can return back to the previous statements in any decent debugger

That's a bit of a stretch. What debuggers are /you/ using?

Re:New React DevTools by tigershark on Friday August 16, 2019 @11:19AM (#20716044)
Visual studio, rider, IntelliJ idea, eclipse, they can all do it, although the last two can only go to the last stack call instead of moving to the specific statement if I recall correctly.
Re:New React DevTools by oauea on Friday August 16, 2019 @11:22AM (#20716073)
IntelliJ cannot step back to the previous statement as the JVM does not support this. Thus neither can Eclipse.
Re:New React DevTools by tigershark on Friday August 16, 2019 @11:44AM (#20716309)
It can discard the last stack frame, as I said in my edited comment.
Re:New React DevTools by mcintyre1994 on Friday August 16, 2019 @09:24AM (#20714885)
You can move around the execution in the VS debugger - if you’re at a break point you can move execution earlier in that function etc. That’s the only debugger I’ve seen doing that though.
Re:New React DevTools by seleniumBubbles on Friday August 16, 2019 @10:18AM (#20715381)
You can also use the “restart stack frame” option in Chrome DevTools to move back to the beginning of any function currently being executed. So if you skip past something on accident, you can just restart the closest stack frame to bring you back.