Incorrect frame line passed to onInterrupt

RESOLVED WORKSFORME

Status

()

RESOLVED WORKSFORME
7 years ago
4 years ago

People

(Reporter: Honza, Unassigned)

Tracking

Trunk
x86
Windows Vista
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [js:p2][firebug-p1])

Attachments

(2 attachments)

Created attachment 651665 [details]
Simple JSD1 based debugger

Firebug is experiencing some problems related to breakpoints and executable lines.

It looks like the frame passed into onInterrupt callback (JSD hook) is sometimes wrong.

See the attached extension (simple JSD debugger) and a test page.

1) Install the extension
2) Load the page
3) Check Firefox Error Console

The console reports lines where interrupt happens, but line #5 is not there, why?

Honza
Related Firebug issue report is here:
https://code.google.com/p/fbug/issues/detail?id=5081

Honza
Whiteboard: [js:p2]
Could this get more attention? It's still a problem for Firebug.
Honza
Any chance this could get fixed?
Many Firebug users already complained about it.

Honza
Whiteboard: [js:p2] → [js:p2][firebug-p1]
Yet another simple test case:

<html>
<head>
	<title>test</title>
</head>
<body>
<script>function x(){}</script>
<script>
	console.log(1);
	debugger; // <- this doesn't work
	console.log(2);
	
(function(){
	console.log(3);
	debugger;
	console.log(4);
	debugger;
	console.log(5);
})()
</script>
</body>
</html>

---

The first 'debugger' keyword doesn't work (the line is also not marked as executable). Since the script object for it doesn't exist...?

If "<script>function x(){}</script>" is removed. All suddenly works well.

Could there be any kind of wrong optimization messing with the "function x"?

Honza
Any tips what could be wrong?

Honza
Assignee: general → nobody
AFAICS this works fine in JSD2 (tested with Firefox 35.0.1 + Firebug 2.0.8 on Win7), so I close this now.

Sebastian
Status: NEW → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.