{ "id": "134110", "key": "TIMOB-17629", "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": [ { "id": "15972", "description": "Release 3.4.0", "name": "Release 3.4.0", "archived": false, "released": true, "releaseDate": "2014-09-28" }, { "id": "16704", "description": "Release 3.5.0", "name": "Release 3.5.0", "archived": false, "released": true, "releaseDate": "2015-01-13" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2014-09-15T18:02:43.000+0000", "created": "2014-08-04T14:46:30.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "TCSupportTriage" ], "versions": [], "issuelinks": [ { "id": "40880", "type": { "id": "10002", "name": "Duplicate", "inward": "is duplicated by", "outward": "duplicates" }, "inwardIssue": { "id": "136141", "key": "AC-804", "fields": { "summary": "iOS: Debugger: actual breakpoint location is off by one in require()'d js modules", "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" } }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } }, { "id": "40881", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "123848", "key": "TIMOB-16004", "fields": { "summary": "iOS: Expose current file path and directory path to commonjs module scope", "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": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "subtask": false } } } } ], "assignee": { "name": "penrique", "key": "penrique", "displayName": "Pedro Enrique", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2014-11-21T20:29:49.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": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "When I debug my application, I need to place the breakpoint exactly one line below the one I want to debug at. This is very frustrating and makes debugging really unpleasant.\r\nThe only exception is file app.js for which breakpoints seems to be handled corectly.\r\n\r\nThe following code illustrates the problem:\r\n\r\n{code:title=app.js|borderStyle=solid}\r\nif (Ti.version < 1.8) {\r\n alert('Sorry - this application template requires Titanium Mobile SDK 1.8 or later');\r\n}\r\n\r\nvar myVar = 5;\r\nvar yourVar = 6;\r\nvar thirdVar = myVar + yourVar;\r\n\r\nvar my = require(\"MyDir/MyThing\").MyThing();\r\nmy.invoke();\r\n{code}\r\nPutting a break point behaves correctly for above file (app.js).\r\n\r\n{code:title=MyThing.js|borderStyle=solid}\r\nexports.MyThing = function() {\r\n\r\n var Me = this;\r\n\r\n var first = 35;\r\n var second = false;\r\n \r\n\tfunction myFunc() {\r\n\t\tvar a = 5 + 3;\r\n\t\treturn a + 2 + 3;\r\n\t}\r\n\t\r\n\tthis.invoke = function() {\r\n\t\tvar b = 7;\r\n\t\treturn myFunc();\r\n\t};\r\n\t\r\n\treturn this;\r\n};\r\n{code}\r\nHowever for the second file, if I need to stop at line 9 I will need to place the breakpoint at line 10. More over, if I need to stop at line 10 I need to put the breakpoint at line 11 which really does not make sence.\r\n\r\nAttached is a sample project.", "attachment": [ { "id": "50209", "filename": "SDK320Test.zip", "author": { "name": "ivo.tasevski", "key": "ivo.tasevski", "displayName": "Ivo", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-08-04T14:46:30.000+0000", "size": 2457512, "mimeType": "application/zip" } ], "flagged": false, "summary": "Debugger does not stop at the correct breakpoint/position", "creator": { "name": "ivo.tasevski", "key": "ivo.tasevski", "displayName": "Ivo", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "ivo.tasevski", "key": "ivo.tasevski", "displayName": "Ivo", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "OS X Version 10.9.2\r\nXCode Version 5.0.2 (5A3005)\r\nTitanium Studio/SDK 3.3.0\r\n\r\n", "closedSprints": [ { "id": 126, "state": "closed", "name": "2018 Sprint 05 SDK", "startDate": "2018-02-25T19:38:08.926Z", "endDate": "2018-03-11T18:38:00.000Z", "completeDate": "2018-03-11T22:06:01.520Z", "originBoardId": 100 } ], "comment": { "comments": [ { "id": "316899", "author": { "name": "pinnamuri", "key": "pinnamuri", "displayName": "Praveen Innamuri", "active": false, "timeZone": "America/Los_Angeles" }, "body": "I can not reproduce the reported problem. The breakpoints always suspend at the line number that I have expected in MyThing.js file. I'm not sure whether there is a caching issue with source maps that is causing the issue on your machine. Can you clean the project and re-run the debugger ?", "updateAuthor": { "name": "pinnamuri", "key": "pinnamuri", "displayName": "Praveen Innamuri", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2014-08-04T18:31:11.000+0000", "updated": "2014-08-04T18:31:11.000+0000" }, { "id": "317083", "author": { "name": "ivo.tasevski", "key": "ivo.tasevski", "displayName": "Ivo", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Cleaning the project did not help. I also tried to create a new workspace and imported the project. Issue is still there. Noticed that the misplaced suspension of the debugger happens only on the source files that are required as commonJS modules. For example, if I include a file using \"Titanium.include\" the debugger seems to suspend on the right place. Perhaps that explains why it works correctly in app.js.\r\nEach member in the team (team of 7) working on our project has this same issue. It is strange that no one else has experienced/reported this.", "updateAuthor": { "name": "ivo.tasevski", "key": "ivo.tasevski", "displayName": "Ivo", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-08-05T14:25:30.000+0000", "updated": "2014-08-05T14:25:30.000+0000" }, { "id": "317249", "author": { "name": "digitalico", "key": "digitalico", "displayName": "Carlos Luis Seva", "active": true, "timeZone": "Europe/Madrid" }, "body": "I have the same error while debugging using 3.3.0 GA, the debugger doesn't stop at the right position, always on the next line and is very annoying. If I use the previous version (3.2.3 GA) the debugger stops in the right position where I have placed the breakpoints. I have tried to clean and also create a new project, but has not solved the problem", "updateAuthor": { "name": "digitalico", "key": "digitalico", "displayName": "Carlos Luis Seva", "active": true, "timeZone": "Europe/Madrid" }, "created": "2014-08-06T09:13:33.000+0000", "updated": "2014-08-06T09:18:47.000+0000" }, { "id": "319279", "author": { "name": "jpriebe", "key": "jpriebe", "displayName": "Jason Priebe", "active": true, "timeZone": "America/New_York" }, "body": "I also have this problem; cleaning does not correct the problem. Ti Studio version 3.3.0.201407100905 OS X 10.9.4. XCode Version 5.1.1 (5B1008)\r\n\r\nMy project is comprised entirely of CommonJS modules (with the exception of app.js, of course). Breakpoints work properly in app.js, but nowhere else.\r\n\r\nPlease fix this; it makes my brain hurt to debug this way!", "updateAuthor": { "name": "jpriebe", "key": "jpriebe", "displayName": "Jason Priebe", "active": true, "timeZone": "America/New_York" }, "created": "2014-08-19T15:33:40.000+0000", "updated": "2014-08-19T15:33:40.000+0000" }, { "id": "322021", "author": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Chris, could you please investigate? Not sure where we need to fix the issue (but I'm guessing somewhere in source map generation)", "updateAuthor": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-09-05T13:32:13.000+0000", "updated": "2014-09-05T13:32:13.000+0000" }, { "id": "322034", "author": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~pec1985] I believe this may actually be related to TIMOB-16004.", "updateAuthor": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-09-05T14:26:52.000+0000", "updated": "2014-09-05T14:26:52.000+0000" }, { "id": "322074", "author": { "name": "penrique", "key": "penrique", "displayName": "Pedro Enrique", "active": false, "timeZone": "America/Los_Angeles" }, "body": "PR pending: https://github.com/appcelerator/titanium_mobile/pull/6021", "updateAuthor": { "name": "penrique", "key": "penrique", "displayName": "Pedro Enrique", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2014-09-05T17:35:21.000+0000", "updated": "2014-09-05T17:35:21.000+0000" }, { "id": "323713", "author": { "name": "penrique", "key": "penrique", "displayName": "Pedro Enrique", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Back port for 3.4.x https://github.com/appcelerator/titanium_mobile/pull/6081", "updateAuthor": { "name": "penrique", "key": "penrique", "displayName": "Pedro Enrique", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2014-09-15T17:46:21.000+0000", "updated": "2014-09-15T17:46:21.000+0000" }, { "id": "323747", "author": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "body": "Verified fix on:\r\n\r\nMac OSX 10.9.4\r\nAppcelerator Studio, build: 3.4.0.201409131030\r\nTitanium SDK build: 3.4.0.v20140915105910 \r\nTitanium CLI, build: 3.4.0-rc3\r\nAlloy: 1.5.0-beta2\r\nXcode6 GM Seed\r\niPhone Device 5 (8.0 GM Seed)\r\n\r\nUsing the test case provided by Satyam I ran the code in debug mode. The breakpoints were correctly hit and the expression value for mything_thirdVar was changed to 11 in the expected place on line 11.\r\n\r\nClosing ticket.", "updateAuthor": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "created": "2014-09-15T18:50:42.000+0000", "updated": "2014-09-15T18:50:42.000+0000" } ], "maxResults": 11, "total": 11, "startAt": 0 } } }