[ALOY-616] Create source mapping for .JS files currently unsupported by the Debugger
GitHub Issue | n/a |
---|---|
Type | Improvement |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2014-11-26T20:51:22.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Alloy 1.5.0 |
Components | Models, Titanium Studio, XML |
Labels | qe-manualtest, usability |
Reporter | Federico Casali |
Assignee | Tim Poulsen |
Created | 2013-04-11T00:27:22.000+0000 |
Updated | 2014-11-26T20:51:22.000+0000 |
PR: https://github.com/appcelerator/alloy/pull/447 Test app: https://github.com/appcelerator/alloy/tree/master/test/apps/testing/ALOY-616 Functional test: 1. Build (compile) the test associated app, or any app that includes a library file in either app/lib, app/vendor, or both. 2. Confirm that build/map/Resources/PLATFORM/FILENAME.js.map exists. 3. Open that map and compare its format to that of build/map/Resources/PLATFORM/app.js.map or any of the maps in the alloy/controllers folder. 4. Test the maps using the tools/checkmap.js script: 4a. At a terminal:
sudo npm install async
4b. From the Alloy repo directory,node tools/checkmap.js
to read the map files and output the relationships between the original and generated line numbers. 4c. For any of the lib or vendor JS files, open both files in an editor. 4d. Compare the original and generated line numbers, as output by checkmap.js, to confirm that the generated lines are correctly corresponding to the original lines. (Note that source maps for widget controllers were already created prior to this PR.) This change does not implement source maps for models, migrations, and adapters for these reasons: A) Models, migrations, and adapters are mostly Appcelerator-written code, auto-generated from configuration objects supplied by the developer. Runtime debugging would point mostly to errors in the configuration data provided by the developer. B) Even prior to this PR, error messages generated by Alloy direct developers to failure points in the config objects in their models and migrations. These are reasonably detailed and likely to be sufficient to track down an error. C) Models, migrations, and adapters are processed prior to an app being loaded. Thus, breakpoint debugging would expose internal Alloy variables but offer the developer little other insight into their app's code.PR merged
[~fcasali] Are you sure TISTUD-4237 is blocking you to verify the reported issue ? I guess TISTUD-6656 should address this scenario as well. Can you please verify once ?
Verified fix on: Mac OSX 10.9.4 Appcelerator Studio, build: 3.4.0.201408282203 Titanium SDK build: 3.4.0.v20140829010914 Titanium CLI, build: 3.4.0-dev Alloy: 1.5.0-dev Built and compiled the project and then checked that the random.js.map and jasmine.js.map matched the format of the app.js.map, then ran the checkmap script. Went through the generated and original files for random.js and jasmine.js and verified the correct file lines using the output from the checkmap script. Closing ticket.