2 Star 0 Fork 0

mirrors_jsantell / 2013.cascadiajs.com

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
stepping-debugger.md 1.70 KB
一键复制 编辑 原始数据 按行查看 历史
James Long 提交于 2013-08-15 09:19 . fix links

A User-land JavaScript Stepping Debugger

Abstract

Programming today can still feel like a black box, even with all the new developer tools for debugging code. I think this is because we don't have the ability to truly customize the debugging experience for our application. What if we could have a user-land JavaScript debugger that you could shape to your needs?

It turns out that you can build a real stepping debugger by abusing yield from ES6 generators. By instrumenting every expression with yield, we gain control of the stack and execution while allowing the native JavaScript VM to still execute everything else. This special code is run inside our own VM in user-land, and allows you to pause and step through code.

An example of the instrumented code is here, and you can step through the code here. If we flesh this out, I think it could be a powerful tool.

Speaker Bio

jlongster

I work for Mozilla and help developers write web apps. In my heart I'm an idealist but I've learned to mix practicality with idealism when approaching software problems. I have a heavy functional programming background with Scheme, and used to write DirectX games in high-school in C++. In fact, I wrote a text-based RPG on my TI-82 calculator during math class in 7th grade. It didn't take off like I thought it would.

马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/mirrors_jsantell/mirrors_jsantell_2013.cascadiajs.com.git
git@gitee.com:mirrors_jsantell/mirrors_jsantell_2013.cascadiajs.com.git
mirrors_jsantell
mirrors_jsantell_2013.cascadiajs.com
2013.cascadiajs.com
master

搜索帮助