使用devtools调试器返回脚本中的上一行 [英] step back to previous line in script with devtools debugger

查看:157
本文介绍了使用devtools调试器返回脚本中的上一行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用谷歌浏览器提供的devtools调试器。在执行控制方面,它允许您在脚本中的任何位置添加断点,甚至允许您将断点附加到事件。您可以在脚本中逐行执行。您可以跳过功能以保持相同的功能或步入功能。当你进入函数时,你可以退出函数返回调用者。



我遇到的一个问题是,当我跳过一个函数调用时,我想回到它,以便进入该函数调用。我读了



即使是一个老问题,我认为这值得传播。



我希望这对某人有用。


I am working with devtools debugger provided by google chrome. In terms of execution control, it allows you to add breakpoints anywhere in script and even allows you to attach breakpoints to events. You can step line by line in a script. You can step over functions to remain in the same function or step into functions. And when you go into functions, you can step out of the function to go back to the caller.

One problem I have is sometimes when I step over a function call, I want to go back to it, in order to step into that function call. I read over https://developer.chrome.com/devtools/docs/javascript-debugging and I cannot find a way to do this. Am I overlooking anything or is there a way to "step back"?

解决方案

Old question, but with "new" info:

Recently the Chrome DevTools got a boost, and now you can "restart" the function that you are debugging. This allows you to set a breakpoint in the previous line, so it looks like a "backwards" button. This can be done by right-clicking on the call stack and select the "Restart frame"

Even being an old question, I think this worths spreading.

I hope this is useful for someone.

这篇关于使用devtools调试器返回脚本中的上一行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆