为提升您的使用体验,本站正在维护,部分功能暂时无法使用。如果本站文章无法解决您的问题,您想要向社区提问的话,请到 Twitter 上的 @FirefoxSupport 或 Reddit 上的 /r/firefox 提问,我们的支持社区将会很快回复您的疑问。

搜索 | 用户支持

防范以用户支持为名的诈骗。我们绝对不会要求您拨打电话或发送短信,及提供任何个人信息。请使用“举报滥用”选项报告涉及违规的行为。

详细了解

Can't debug JavaScript written under RequireJS with built-in Debugger

  • 4 个回答
  • 13 人有此问题
  • 1 次查看
  • 最后回复者为 dmenssen

more options

Hi! I'm new to Firefox and I'm developing a website using this browser.

The JavaScript code written in our pages conform to the RequireJS standards. When I want to debug the code, I find that the new built-in debugger of Firefox can't enter the functions correctly.

For example, if I put a break point inside a function that is defined in a "define" function, the debugger only stops at the last line of the "define" function, and shows the information of all the global variables.

I really like the look and feel of the debugger, but it seems not working correctly.

See the picture of the first reply.

Hi! I'm new to Firefox and I'm developing a website using this browser. The JavaScript code written in our pages conform to the RequireJS standards. When I want to debug the code, I find that the new built-in debugger of Firefox can't enter the functions correctly. For example, if I put a break point inside a function that is defined in a "define" function, the debugger only stops at the last line of the "define" function, and shows the information of all the global variables. I really like the look and feel of the debugger, but it seems not working correctly. See the picture of the first reply.

由tiden0614于修改

所有回复 (4)

more options

This is the picture describing the problem.

The debugger stops at the last line of the "define" function instead of the point I want it to stop.

more options

You can try out the debugger in the latest Firefox Nightly release to see if it already works better in that version as the devtools are still being developed.

You can install multiple Firefox versions via a custom install in different installation folders and keep the current release version installed to be able to fallback to the release version in cases when the Nightly or Aurora build aren't working properly.

Do a custom install of each version in a different program folder and use the Profile Manager to create a new profile for this version, so make sure not to start Firefox after the installation has finished.

Create a desktop shortcut with -P "profile" appended to the target to launch each Firefox version with its own profile.
Note that the Aurora (28.0a2) and Nightly (29.0a1) build are updated daily and can be unstable being alpha releases.

See these mozillaZine KB articles for information:

more options

THX for the reply!

Although the appearance of the debugger changed (seems updated), the problem is still not solved. At least for the Mac version.

Anyway, I'm looking forward to future versions! I like this browser which possesses a lot of features that I can't find on other browsers.

more options

I'm having exactly this problem. Screenshot attached from Aurora, but I also tested and had the same issue in Nightly.

Would be happy to help with a test case or in any way I can.