Incorrect frame line passed to onInterrupt

RESOLVED WORKSFORME

Status

()

Core
JavaScript Engine
RESOLVED WORKSFORME
6 years ago
3 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)

(Reporter)

Description

6 years ago
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
(Reporter)

Comment 1

6 years ago
Created attachment 651666 [details]
Test page
(Reporter)

Comment 2

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

Honza
Whiteboard: [js:p2]
(Reporter)

Comment 3

6 years ago
Could this get more attention? It's still a problem for Firebug.
Honza
(Reporter)

Comment 4

6 years ago
Any chance this could get fixed?
Many Firebug users already complained about it.

Honza
Whiteboard: [js:p2] → [js:p2][firebug-p1]
(Reporter)

Comment 5

6 years ago
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
(Reporter)

Comment 6

6 years ago
Any tips what could be wrong?

Honza
(Assignee)

Updated

4 years ago
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: 3 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.