{ "id": "65629", "key": "TIMOB-4158", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [], "resolution": { "id": "7", "description": "", "name": "Invalid" }, "resolutiondate": "2016-03-16T17:25:23.000+0000", "created": "2011-05-20T11:06:15.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "debugger", "null", "undefined" ], "versions": [ { "id": "11244", "name": "Release 1.7.0", "archived": true, "released": true, "releaseDate": "2011-06-13" }, { "id": "17532", "name": "Release 5.1.1", "archived": false, "released": true, "releaseDate": "2015-11-24" } ], "issuelinks": [], "assignee": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-03-20T17:20:57.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "10202", "name": "Android", "description": "Android Platform" }, { "id": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "*Steps to reproduce:*\r\n# Create a Titanium classic app\r\n# In the app.js file, replace the code with the following:\r\n{code}\r\nvar win = Ti.UI.createWindow({\r\n\tbackgroundColor: 'white',\r\n\tlayout: 'vertical'\r\n});\r\n\r\nvar f = function() {\r\n\tvar foo = \"a\";\r\n\tTi.API.info(\"Inside anonymous function: \"+foo);\r\n\tTi.API.info(\"Global val: \"+x);\r\n\tx+=1;\r\n};\r\n\r\nvar b1 = Ti.UI.createButton({\r\n\ttitle:'Anonymous f/g',\r\n\ttop:20\r\n});\r\n\r\nb1.addEventListener('click', function(e) {\r\n\tf();\r\n\tvar g = f;\r\n\tg();\r\n});\r\n\r\nwin.add(b1);\r\nwin.open();\r\n{code}\r\n# Add a breakpoint on line 7\r\n# Debug app to iOS simulator or Android emulator\r\n# After the app is launched, press the \"Anonymous f/g\" button\r\n# Breakpoint should be triggered\r\n\r\n*Actual:* In Studio's debugger variables pane, foo is set to undefined; see attachment.\r\n*Expected:* According to test case 1013, step 9, in https://wiki.appcelerator.org/display/tp/Debugger+Test+Plan, foo should be set to null.\r\n\r\n ", "attachment": [ { "id": "57640", "filename": "Screen Shot 2015-11-30 at 5.51.56 PM.png", "author": { "name": "wluu", "key": "wluu", "displayName": "Wilson Luu", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2015-12-01T01:58:41.000+0000", "size": 32648, "mimeType": "image/png" } ], "flagged": false, "summary": "Debugger: Variable pane is returning 'undefined' instead of null ", "creator": { "name": "nhuynh", "key": "nhuynh", "displayName": "Natalie Huynh", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "nhuynh", "key": "nhuynh", "displayName": "Natalie Huynh", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "Appcelerator Studio, build: 4.4.0.201511241829 \r\nAppc CLI NPM: 4.2.2 \r\nAppc CLI Core: 5.1.0 \r\nArrow: 1.3.22 \r\nSDK: May 19 2011 16:19 r592c8e01, 5.1.1.GA \r\nNode: v4.2.2 \r\nOS: El Capitan (10.11.1) \r\nXcode: 7.1.1 \r\nDevices: Android Emulator 2.1, iphone 6 simulator (9.1), genymotion emulator (4.4.4)\r\n", "comment": { "comments": [ { "id": "371722", "author": { "name": "wluu", "key": "wluu", "displayName": "Wilson Luu", "active": false, "timeZone": "America/Los_Angeles" }, "body": "I can reproduce this issue with current GA stack on both Android and iOS.\r\n\r\nTested on:\r\n\r\nAppcelerator Studio, build: 4.4.0.201511241829\r\nAppc CLI NPM: 4.2.2\r\nAppc CLI Core: 5.1.0\r\nArrow: 1.3.22\r\nSDK: 5.1.1.GA\r\nNode: v4.2.2\r\nOS: El Capitan (10.11.1)\r\nXcode: 7.1.1\r\nDevices: iphone 6 simulator (9.1), genymotion emulator (4.4.4)", "updateAuthor": { "name": "wluu", "key": "wluu", "displayName": "Wilson Luu", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2015-12-01T01:50:31.000+0000", "updated": "2015-12-01T01:50:31.000+0000" }, { "id": "379794", "author": { "name": "apetkov", "key": "apetkov", "displayName": "Angel Petkov", "active": true, "timeZone": "America/Los_Angeles" }, "body": "When you're at line 7 foo is undefined. It should return null if you added {code:javascript}var foo;{code} at line 6.However you are defining and assigning the value at line 7 as far as the compiler is concerned. When the debugger is at line 7, it means the last command executed was 6 and 7 is the next line to be executed. ", "updateAuthor": { "name": "apetkov", "key": "apetkov", "displayName": "Angel Petkov", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-03-15T22:44:19.000+0000", "updated": "2016-03-15T22:48:39.000+0000" }, { "id": "413742", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket as invalid.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-20T17:20:57.000+0000", "updated": "2017-03-20T17:20:57.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }