Open Bug 1544203 Opened 5 years ago Updated 1 year ago

devtools report wrong file:line

Categories

(DevTools :: Debugger, defect, P3)

66 Branch
defect

Tracking

(Not tracked)

UNCONFIRMED

People

(Reporter: kes-kes, Unassigned)

References

(Blocks 1 open bug)

Details

Attachments

(6 files)

Attached image correct name of view

User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:66.0) Gecko/20100101 Firefox/66.0

Steps to reproduce:

I dynamically load javascript:

$.ajax({
  url      : oop.LibDir +moduleName+ '.js',
  async    : false,
  dataType : 'text',
  success  : function( data ) {
      window.eval( data + "\n//# sourceURL=" + moduleName + ".js");
  },
});

Actual results:

when the target source has syntax error FF does not report correct file when error happened. the line though is correct

When the exception occur at such dynamically loaded code then 'eval' is used for file name at the error message

but the name of the view for this source code is correct also (see attached files)

Expected results:

sourceUrl should be used instead of 'eval'

Thank you Eugen for the report. Could you please attach a reduced test case to help reproducing the issue?

Component: Untriaged → Debugger
Product: Firefox → DevTools
Flags: needinfo?(kes-kes)
Attached file del.tar

example

Flags: needinfo?(kes-kes)

you also can make syntax error at hello.js file and see the file:line of error

Attached file modified.tar

modified example

Attached image __.jpg
Blocks: dbg-sources
Priority: -- → P3
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: