Why does Firebug seem to hit a phantom breakpoint at the last line of my script, and then not hit my real breakpoint?

23 views
Skip to first unread message

david.karr

unread,
Jun 8, 2015, 5:36:06 PM6/8/15
to fir...@googlegroups.com
I'm on CentOS 7, using Firebug on Firefox (looks like version 31.0.0) to debug some javascript unit tests, being run by Karma. These tests are all working, but I've modified the infrastructure to use RequireJS, but just for the tests.

After Karma starts up, I can connect to the Karma port and then reload the page, to ensure all the relevant scripts are loaded.  I then set a breakpoint in the line in my unit test that I care about (which happens to be line 100 of a 167 line file).  I then reload the page again to execute the tests so it will hit my breakpoint.

What happens next is that Firebug appears to hit a breakpoint at the last line of my test spec, line 167.  It clearly shows the yellow arrow on the last line.  This is not the line I set my breakpoint on.  The info on the "Stack" tab agrees with what I see. I then click on the "Breakpoints" tab, and it shows my single breakpoint on line 100. If I then "Continue", the yellow arrow goes away and it does not hit my declared breakpoint.

When I run these tests using PhantomJS, it definitely hits the line I've set a breakpoint on, as I'm hitting an error that includes that line in the stacktrace.
Reply all
Reply to author
Forward
0 new messages