{ "id": "102230", "key": "TIMOB-11172", "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": null, "resolutiondate": null, "created": "2012-09-26T20:39:37.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [ "debugger", "parity", "qe-ios090112" ], "versions": [ { "id": "14096", "description": "Release 2.1.2", "name": "Release 2.1.2", "archived": true, "released": true, "releaseDate": "2012-08-31" }, { "id": "14137", "description": "Release 2.1.3", "name": "Release 2.1.3", "archived": true, "released": true, "releaseDate": "2012-10-03" }, { "id": "13505", "description": "Release 3.0.0", "name": "Release 3.0.0", "archived": true, "released": true, "releaseDate": "2012-12-14" } ], "issuelinks": [ { "id": "21575", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "102232", "key": "TIMOB-11173", "fields": { "summary": "Android: Debugger: breakpoint at global unassigned variable declaration hits next statement instead", "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" } }, "priority": { "name": "Low", "id": "4" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": null, "updated": "2018-02-28T20:03:31.000+0000", "status": { "description": "This issue was once resolved, but the resolution was deemed incorrect. From here issues are either marked assigned or resolved.", "name": "Reopened", "id": "4", "statusCategory": { "id": 2, "key": "new", "colorName": "blue-gray", "name": "To Do" } }, "components": [ { "id": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "Breakpoints at unassigned variable declarations are skipped.\r\n\r\nFor example:\r\n\r\n{code}\r\nvar deadVar1; // breakpoint\r\n\r\nTi.API.info('Global Variables Defined!');\r\n\r\n(function(){\r\n\tvar deadVar2; // breakpoint\r\n\t\r\n\tTi.API.info('Anonymous Function Called!');\r\n})();\r\n\r\nalert('App Exited!');\r\n{code}\r\n\r\nRunning this code in debug mode will skip all breakpoints.\r\n\r\nThis does not occur in Android, this is a parity issue.\r\n\r\nSteps to Reproduce:\r\n\r\n1. Run code in debug (manually insert breakpoints as per code comments):\r\n\r\n{code}\r\nvar deadVar1; // breakpoint\r\n\r\nTi.API.info('Global Variables Defined!');\r\n\r\n(function(){\r\n\tvar deadVar2; // breakpoint\r\n\t\r\n\tTi.API.info('Anonymous Function Called!');\r\n})();\r\n\r\nalert('App Exited!');\r\n{code}\r\n\r\nActual Result:\r\n\r\nApp exits without hitting any breakpoints.\r\n\r\nExpected Result:\r\n\r\nThe first breakpoint should be hit and pressing 'Resume' should hit the next breakpoint.\r\n\r\nHere is the expected console log for the sample code:\r\n\r\n{code}\r\n[INFO] Global Variables Defined!\r\n[INFO] Anonymous Function Called!\r\n{code}", "attachment": [ { "id": "32056", "filename": "androiddebugger.log", "author": { "name": "dhyde", "key": "dhyde", "displayName": "Dustin Hyde", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-09-26T20:39:38.000+0000", "size": 3598, "mimeType": "text/plain" }, { "id": "32057", "filename": "app.js", "author": { "name": "dhyde", "key": "dhyde", "displayName": "Dustin Hyde", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-09-26T20:39:38.000+0000", "size": 188, "mimeType": "text/javascript" }, { "id": "32060", "filename": "console-log.txt", "author": { "name": "dhyde", "key": "dhyde", "displayName": "Dustin Hyde", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-09-26T20:39:38.000+0000", "size": 83, "mimeType": "text/plain" }, { "id": "32058", "filename": "iosdebugger.log", "author": { "name": "dhyde", "key": "dhyde", "displayName": "Dustin Hyde", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-09-26T20:39:38.000+0000", "size": 1980, "mimeType": "text/plain" }, { "id": "32059", "filename": "MyProject.zip", "author": { "name": "dhyde", "key": "dhyde", "displayName": "Dustin Hyde", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-09-26T20:39:38.000+0000", "size": 3122581, "mimeType": "application/zip" } ], "flagged": false, "summary": "iOS: Debugger: breakpoint at unassigned variable declaration skipped", "creator": { "name": "dhyde", "key": "dhyde", "displayName": "Dustin Hyde", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "dhyde", "key": "dhyde", "displayName": "Dustin Hyde", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "Titanium SDK: 2.1.2.GA, 2.1.3.v20120925134611, 3.0.0.v20120925124913\r\nTitanium Studio: 2.1.2, 3.0.0.201209252419\r\nOS: Mountain Lion 10.8.2\r\nXcode: 4.5\r\nDevice: iPhone Simulator 5.1/6.0", "closedSprints": [ { "id": 597, "state": "closed", "name": "2016 Sprint 06 SDK", "startDate": "2016-03-12T01:30:59.982Z", "endDate": "2016-03-26T00:30:00.000Z", "completeDate": "2016-03-28T03:38:09.726Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "221105", "author": { "name": "dhyde", "key": "dhyde", "displayName": "Dustin Hyde", "active": true, "timeZone": "America/Los_Angeles" }, "body": "We should also address that if a breakpoint is inserted at a blank line of code, the next statement should be hit by the debugger, as it does in Android. This is a related usability issue that is a manifestation of this underlying bug. Please open another ticket for this behavior if necessary.\r\n\r\nCurrently, if a blank line of code has a breakpoint, it is skipped entirely. It should just hit the next statement.", "updateAuthor": { "name": "dhyde", "key": "dhyde", "displayName": "Dustin Hyde", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-09-26T21:32:57.000+0000", "updated": "2012-09-26T21:34:12.000+0000" }, { "id": "221125", "author": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "body": "When you say that this happens for Android, is this in ADT? Or in the Studio debugger?", "updateAuthor": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-09-26T22:42:57.000+0000", "updated": "2012-09-26T22:42:57.000+0000" }, { "id": "221129", "author": { "name": "dhyde", "key": "dhyde", "displayName": "Dustin Hyde", "active": true, "timeZone": "America/Los_Angeles" }, "body": "The next statement is hit if a breakpoint is on a blank line for Android in the Titanium Studio debugger.", "updateAuthor": { "name": "dhyde", "key": "dhyde", "displayName": "Dustin Hyde", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-09-26T22:45:14.000+0000", "updated": "2012-09-26T22:45:14.000+0000" }, { "id": "371841", "author": { "name": "htbryant", "key": "htbryant", "displayName": "Harry Bryant", "active": true, "timeZone": "Europe/London" }, "body": "I can still reproduce this issue, breakpoints stated in the above test case are skipped with the following components:\r\n{code:java}\r\nMac OSX El Capitan: 10.11.1 (15B42)\r\nTi SDK: 5.1.1.GA\r\nAppc NPM: 4.2.2\r\nAppc CLI: 5.1.0\r\nXcode 7.1(7B91b)\r\nNode v4.2.2\r\n{code}", "updateAuthor": { "name": "htbryant", "key": "htbryant", "displayName": "Harry Bryant", "active": true, "timeZone": "Europe/London" }, "created": "2015-12-02T01:00:04.000+0000", "updated": "2015-12-02T01:00:04.000+0000" }, { "id": "379772", "author": { "name": "apetkov", "key": "apetkov", "displayName": "Angel Petkov", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~willcode2surf] Hi, this issue should be resolved using the newest debugger, by downloading the most recent master which can be found [here|http://builds.appcelerator.com.s3.amazonaws.com/index.html#master]. Also enable on main thread needs to be set to true by adding the following code :{code:xml} true{code}.Breakpoints added now will be hit regardless of which line they're added too. ", "updateAuthor": { "name": "apetkov", "key": "apetkov", "displayName": "Angel Petkov", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-03-15T18:46:48.000+0000", "updated": "2016-03-15T18:46:48.000+0000" }, { "id": "399613", "author": { "name": "amukherjee", "key": "amukherjee", "displayName": "Abir Mukherjee", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Testing with this environment, it appears the bug is not resolved:\r\nNPM Version: 2.15.9\r\nNode Version: 4.5.0\r\nMac OS: 10.11.6\r\nAppc CLI: 5.5.1\r\nAppc CLI NPM: 4.2.7\r\nTitanium SDK version: 6.0.0.v20161019091022\r\nAppcelerator Studio, build: 4.8.0.201610171310\r\nXcode 8.0 GM\r\n\r\nUsing the example code that was posted above, the debugger stops on the the first breakpoint at deadVar1. After clicking on the Resume button it does not stop at deadVar2, or the following statement after deadVar2. It executes completely through, and the 'App exited' alert is seen. This was done on iOS simulator and device. I am using the latest versions of Studio and the SDK. I also added the run-on-main-thread tag in with a value of true.", "updateAuthor": { "name": "amukherjee", "key": "amukherjee", "displayName": "Abir Mukherjee", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-10-21T21:31:01.000+0000", "updated": "2016-10-21T21:32:10.000+0000" }, { "id": "399639", "author": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "body": "[~amukherjee] I'll be interested to know if true will resolve this issue.", "updateAuthor": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2016-10-24T03:23:14.000+0000", "updated": "2016-10-24T03:23:23.000+0000" }, { "id": "399692", "author": { "name": "amukherjee", "key": "amukherjee", "displayName": "Abir Mukherjee", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Yes it did resolve the issue. I added this tag in :\r\n\r\n\r\n true\r\n\r\n\r\nAll the breakpoints were hit.", "updateAuthor": { "name": "amukherjee", "key": "amukherjee", "displayName": "Abir Mukherjee", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-10-24T16:56:05.000+0000", "updated": "2016-10-24T16:59:51.000+0000" }, { "id": "399698", "author": { "name": "amukherjee", "key": "amukherjee", "displayName": "Abir Mukherjee", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Is that tag now required for projects where the debugger will be used?", "updateAuthor": { "name": "amukherjee", "key": "amukherjee", "displayName": "Abir Mukherjee", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-10-24T17:30:42.000+0000", "updated": "2016-10-24T17:30:42.000+0000" }, { "id": "399729", "author": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Eventually it will be set as default, likely in the next major version release.\r\nBasically for Titanium SDK 6.0.0, use this tag to address this issue.", "updateAuthor": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2016-10-24T22:23:35.000+0000", "updated": "2016-10-24T22:23:35.000+0000" } ], "maxResults": 10, "total": 10, "startAt": 0 } } }