Closed Bug 889492 Opened 11 years ago Closed 11 years ago

Debugger does not stop at the debugger; statement in original files

Categories

(DevTools :: Debugger, defect, P3)

25 Branch
x86
macOS
defect

Tracking

(Not tracked)

RESOLVED FIXED
Firefox 26

People

(Reporter: thomas, Assigned: fitzgen)

Details

Attachments

(2 files)

Attached file dev-tools-tests4.zip
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/27.0.1453.116 Safari/537.36

Steps to reproduce:

Using Nightly 25.0a1 (2013-07-02)

1. Navigate to: https://dl.dropboxusercontent.com/u/22032742/dev-tools-tests4/debugger-source-maps.html
   or unzip the files in the attachment

2 [review]. Open the debugger
3. Click Say Hello 1
4. Click Say Hello 2


Actual results:

The debugger halts at the debugger; statement in the production all.js file


Expected results:

It should have halted in the ts/Greeter2.ts file

To me it seems to work when the all.js file is compiled from only one TypeScript file.
When more than two TypeScript files are compiled to one production JS the debugger causes this behavior.

Also notice that the original sources are never displayed in file list left for the source code view.
Version: unspecified → 25 Branch
Component: Untriaged → Developer Tools: Debugger
The example has been tested an works as expected in Chrome 27.0.1453.116
Component: Developer Tools: Debugger → Untriaged
Component: Untriaged → Developer Tools: Debugger
Pulling up the browser console, I get the following error:

[12:15:26.377] Error: No element indexed by 7 @ resource://gre/modules/devtools/dbg-server.jsm -> resource://gre/modules/devtools/server/actors/script.js:2929
Status: UNCONFIRMED → NEW
Ever confirmed: true
Only place that throws an error with this message: http://mxr.mozilla.org/mozilla-central/source/toolkit/devtools/sourcemap/SourceMap.jsm#729

Aside: We need to improve our reportError function
(In reply to Nick Fitzgerald [:fitzgen] from comment #3)
> Aside: We need to improve our reportError function

Bug 889526
Assignee: nobody → nfitzgerald
Priority: -- → P3
We've since improved error reporting, and the message I am getting now is this one:

[16:37:49.539] No element indexed by 7:
ArraySet_at@resource://gre/modules/devtools/SourceMap.jsm:729
SourceMapConsumer_parseMappings@resource://gre/modules/devtools/SourceMap.jsm:198
SourceMapConsumer@resource://gre/modules/devtools/SourceMap.jsm:113
TS__fetchSourceMap/promise<@resource://gre/modules/devtools/dbg-server.jsm -> resource://gre/modules/devtools/server/actors/script.js:3487
resolve@resource://gre/modules/devtools/dbg-server.jsm -> resource://gre/modules/commonjs/sdk/core/promise.js:118
then@resource://gre/modules/devtools/dbg-server.jsm -> resource://gre/modules/commonjs/sdk/core/promise.js:43
resolve@resource://gre/modules/devtools/dbg-server.jsm -> resource://gre/modules/commonjs/sdk/core/promise.js:185
resolve@resource://gre/modules/devtools/dbg-server.jsm -> resource://gre/modules/commonjs/sdk/core/promise.js:118
then@resource://gre/modules/devtools/dbg-server.jsm -> resource://gre/modules/commonjs/sdk/core/promise.js:43
resolve@resource://gre/modules/devtools/dbg-server.jsm -> resource://gre/modules/commonjs/sdk/core/promise.js:185
fetch/streamListener.onStopRequest@resource://gre/modules/devtools/dbg-server.jsm -> resource://gre/modules/devtools/server/actors/script.js:3759
 @ resource://gre/modules/devtools/dbg-server.jsm -> resource://gre/modules/devtools/server/actors/script.js:3806

I believe this is https://github.com/mozilla/source-map/pull/72 cropping up. Looks like I missed the pull request being updated! Woops!
Now that the source-map lib can handle source maps with duplicates in the `sources` and `names` arrays, this issue is fixed by updating to the latest version of the source=map lib (which includes tests for this bug).

Also verified the fix on the test case in this bug.

https://tbpl.mozilla.org/?tree=Try&rev=48dece508120
Attachment #793772 - Flags: review?(rcampbell)
Comment on attachment 793772 [details] [diff] [review]
bug-889492-typescript-source-maps.patch

Asked Anton for review since robcee is MIA on PTO, from across the table he says r+.
Attachment #793772 - Flags: review?(rcampbell) → review+
https://hg.mozilla.org/mozilla-central/rev/c25190a9c9ae
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Whiteboard: [fixed-in-fx-team]
Target Milestone: --- → Firefox 26
(In reply to Nick Fitzgerald [:fitzgen] from comment #7)
> Comment on attachment 793772 [details] [diff] [review]
> bug-889492-typescript-source-maps.patch
> 
> Asked Anton for review since robcee is MIA on PTO, from across the table he
> says r+.

did he at least look at it?
Yeah he looked at it, and I talked him through it, and he said ok.
can we attach the table to this bug for proof? :)
<table>
  <tbody>
    <tr><td>Anton</td></tr>
    <tr><td>Nick</td></tr>
  </tbody>
</table>
table.class = "review+";
Original test case tested and works
OS X 10.8.4/Nightly 26.0a1 (2013-09-05) 

Thanks!

Thomas Andersen
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: