How to go backwards while debugging Javascript in Chrome sources debugging?

随声附和 提交于 2019-12-21 03:22:11

问题


Chrome sources debugging has buttons for step over, step into, and step out. There is no stepping backwards in time to see what were the previous functions.


回答1:


You can sort of go backwards if you click through in the "Call Stack" on the right side to see the parent functions.




回答2:


As I said on this answer, you can step back by placing a new breakpoint and restarting the actual function. Hope this makes the trick.




回答3:


One quick workaround I found out is to make a small change to the source file any change is fine (space, comment, whatever) while you are in the middle of the breakpoint then press Ctrl+s (save the file) and it will jump back to the first break point in that source. Then you can check your changes (F10 'step-in') then make another change if needed, Save it and it will restart. This is the fastest approach I have so far.




回答4:


This is what I was looking for and found this link first. It is a more advanced version of the question I suppose..

The correct keyword to help search this is "Time Travel Debugging"

First noted here in this version of nodejs called, "Node-ChakraCore".

https://github.com/nodejs/node-chakracore/blob/master/TTD-README.md



来源:https://stackoverflow.com/questions/17498159/how-to-go-backwards-while-debugging-javascript-in-chrome-sources-debugging

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!