Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我在用 chrome 调试用 js bin 编写的 js 代码时遇到问题。
每次当我使用 JS 编辑/单击运行时,都会生成新的源文件并且不会命中旧断点。
你有解决这个问题的方法吗?
只需debugger在您的代码中使用一个语句。即使 jsbin 会给你一个警告并且不会自动运行,你仍然可以点击run按钮(或按⌃</kbd>⏎</kbd>) and your code will pause on the debugger statement.
debugger
run
您还可以在Sources选项卡上查找名为 的项目(no domain)。它里面的文件有你的JS,你可以设置断点。
Sources
(no domain)
它在 runner - JS Bin 输出 - (无域) - leduzidigo.js