{ "id": "136141", "key": "AC-804", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "12217", "key": "AC", "name": "Appcelerator - INBOX", "projectCategory": { "id": "10000", "description": "", "name": "Customer Service" } }, "resolution": { "id": "3", "description": "The problem is a duplicate of an existing issue.", "name": "Duplicate" }, "resolutiondate": "2015-08-30T07:17:08.000+0000", "created": "2014-09-05T09:23:15.000+0000", "labels": [ "debugger-ios", "ios" ], "versions": [], "issuelinks": [ { "id": "40880", "type": { "id": "10002", "name": "Duplicate", "inward": "is duplicated by", "outward": "duplicates" }, "outwardIssue": { "id": "134110", "key": "TIMOB-17629", "fields": { "summary": "Debugger does not stop at the correct breakpoint/position", "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": "High", "id": "2" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "updated": "2016-03-08T07:37:04.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": "14552", "name": "Appcelerator CLI", "description": "Please enter tickets related to Tooling and the CLI here" }, { "id": "14548", "name": "Titanium SDK & CLI", "description": "Please enter tickets related to the MobileSDK here." } ], "description": "Since Ti SDK 3.3.0 (but not with earlier versions), when setting a breakpoint in a common js module the JSCore debugger will suspend on the previous line. This is not immediately evident in Ti Studio, since the debugger UI highlights the expected line.\r\nThe following code can be used to reveal the wrong behaviour:\r\n\r\n{code:title=mymodule.js|borderStyle=solid}\r\n exports.doSomething = function() {\r\n\tTi.API.info(\"line 2\");\r\n\tTi.API.info(\"line 3\");\r\n\tTi.API.info(\"line 4\");\r\n};\r\n{code}\r\n\r\n{code:title=app.js|borderStyle=solid}\r\nvar bt = require(\"mymodule\").doSomething();\r\n{code}\r\n\r\nWith a breakpoint set at line 4 of the mymodule.js file, the execution is suspended at line 3, with the console output showing only\r\n\r\n{noformat}\r\n[INFO] line 2\r\n{noformat}\r\n\r\nThis is caused by the commonJS wrapping code introduced by the {{-\\[KrollBridge loadCommonJSModule:withSourceURL:\\]}} method, which actually adds a line on top of a file being require()'d, thus creating a discordance between the code parsed by JSCore and that viewed by the editor.", "attachment": [], "flagged": false, "summary": "iOS: Debugger: actual breakpoint location is off by one in require()'d js modules", "creator": { "name": "omorandi", "key": "omorandi", "displayName": "Olivier Morandi", "active": true, "timeZone": "Europe/Berlin" }, "subtasks": [], "reporter": { "name": "omorandi", "key": "omorandi", "displayName": "Olivier Morandi", "active": true, "timeZone": "Europe/Berlin" }, "environment": "Titanium SDK: 3.3.0.GA\r\nTitanium Studio: 3.3.0.201407100905\r\nOS: Mavericks 10.9.3\r\nDevices: iPhone Simulator 7.1", "comment": { "comments": [ { "id": "322033", "author": { "name": "omorandi", "key": "omorandi", "displayName": "Olivier Morandi", "active": true, "timeZone": "Europe/Berlin" }, "updateAuthor": { "name": "omorandi", "key": "omorandi", "displayName": "Olivier Morandi", "active": true, "timeZone": "Europe/Berlin" }, "created": "2014-09-05T14:20:32.000+0000", "updated": "2014-09-05T14:20:32.000+0000" } ], "maxResults": 1, "total": 1, "startAt": 0 } } }