Titanium JIRA Archive
Alloy (ALOY)

[ALOY-597] Windows: Debug source map reports incorrect line

GitHub Issuen/a
TypeBug
PriorityCritical
StatusClosed
ResolutionInvalid
Resolution Date2013-04-02T20:52:15.000+0000
Affected Version/sAlloy 1.1.0
Fix Version/s2013 Sprint 07
ComponentsTitanium Studio
Labelsn/a
ReporterFederico Casali
AssigneeTony Lukasavage
Created2013-04-02T01:30:39.000+0000
Updated2013-04-03T17:49:04.000+0000

Description

Problem description

Under Windows, setting a breakpoint on the original controller source did not cause the app to break where expected. Setting a breakpoint on the generated controller source works.

Steps to reproduce

Sample 'index.js'

function doClick(e) {  
    alert($.label.text + a);
}

var a = 5;

$.index.open();
Attached the 'Resources/alloy/controllers/index.js' generated file. 1) Set a Breakpoint at line 2 ( alert($.label.text + a); ) 2) Debug for Android Result: Breakpoints are ignored 3) Check the source map with command (from the build folder):
$ alloy debugger generated "map/Resources/alloy/controllers/index.js.map" --line 2 --column 6 --source "app/alloy/controllers/index.js"
Expected result:
{line: 3, column: 9}
Actual Result:
{ line: 35, column: 17 }

Attachments

FileDateSize
index.js2013-04-02T01:42:16.000+00001189

Comments

  1. Tony Lukasavage 2013-04-02

    I can't reproduce this with the given code. This same code maps correctly for me on both Mac and Windows giving expected results for a number of different "generated" tests on my end. You might be having an error because you are using an invalid filename as for the --source option. "app/alloy/controllers/index.js" would never exist. I think you mean "app/controllers/index.js". This is likely the root of the issue. Please confirm and close if this is true.
  2. Federico Casali 2013-04-02

    Confirming it was an error in the command (path and use '\' instead of '/') Using the sample code and launching the command: $ alloy debugger generated "build\map\Resources\alloy\controllers\index.js.map" --line 2 --column 6 --source "app\controllers\index.js" correctly returns: { line: 3, column: 8 } Closing as invalid and opening a new one against Studio for the debugger isse.

JSON Source