{ "id": "169536", "key": "TIMOB-25167", "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": "2017-08-14T11:59:29.000+0000", "priority": { "name": "None", "id": "6" }, "labels": [], "versions": [ { "id": "19878", "name": "Hyperloop 2.1.3", "archived": false, "released": true, "releaseDate": "2017-08-04" } ], "issuelinks": [], "assignee": null, "updated": "2018-02-28T19:55:30.000+0000", "status": { "description": "The issue is open and ready for the assignee to start work on it.", "name": "Open", "id": "1", "statusCategory": { "id": 2, "key": "new", "colorName": "blue-gray", "name": "To Do" } }, "components": [ { "id": "13715", "name": "Hyperloop", "description": "Hyperloop project" }, { "id": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "*Steps to reproduce the behavior*\r\n# Create a default Alloy app\r\n# Replace the content in {{app/controllers/index.js}} with the following:\r\n{code}\r\nfunction doClick(e) {\r\n\talert($.label.text);\r\n}\r\n\r\nvar UIButton = require('UIKit/UIButton');\r\nvar UIColor = require('UIKit/UIColor');\r\nvar UIControlStateNormal = require(\"UIKit\").UIControlStateNormal;\r\nvar UIControlEventTouchUpInside = require(\"UIKit\").UIControlEventTouchUpInside;\r\nvar CGRectMake = require('CoreGraphics').CGRectMake;\r\nvar button = UIButton.alloc().initWithFrame(CGRectMake(20, 20, 100, 50));\r\nbutton.setTitleColorForState(UIColor.blueColor, UIControlStateNormal);\r\nbutton.setTitleForState('CLICK ME!', UIControlStateNormal);\r\nvar ButtonActionHandler = Hyperloop.defineClass('ButtonActionHandler', 'NSObject');\r\nButtonActionHandler.addMethod({\r\n\tselector: 'didPressButton:',\r\n\targuments: ['UIButton'],\r\n\tcallback: function(sender) {\r\n\t\talert('Button pressed!'); // Set breakpoint here\r\n\t}\r\n});\r\nhandler = new ButtonActionHandler();\r\nbutton.addTargetActionForControlEvents(handler, 'didPressButton:', UIControlEventTouchUpInside);\r\n$.index.add(button);\r\n\r\n$.index.open(); // Set breakpoint here\r\n{code}\r\n# Place the breakpoints and launch the app in debug mode\r\n\r\n*Actual behavior*\r\nThe second breakpoints gets hit every now and then, but not reliably. The first breakpoint in the button on click handler never gets hit.\r\n\r\n*Expected behavior*\r\nThe debugger stops at the breakpoints\r\n\r\n*Additional notes*\r\nThis is probably caused by file modifications Hyperloop does throughout the build. As a workaround it is possible to debug using the Safari Web Inspector as described [here|https://shockoe.com/blog/debugging-titanium-applications-using-safari-web-inspector/].", "attachment": [], "flagged": false, "summary": "Hyperloop: iOS - Debugging not working reliably with Studio", "creator": { "name": "jvennemann", "key": "jvennemann", "displayName": "Jan Vennemann", "active": true, "timeZone": "Europe/Berlin" }, "subtasks": [], "reporter": { "name": "jvennemann", "key": "jvennemann", "displayName": "Jan Vennemann", "active": true, "timeZone": "Europe/Berlin" }, "environment": null, "comment": { "comments": [], "maxResults": 0, "total": 0, "startAt": 0 } } }