Description of the problem
Due to a recent chance in the way event listeners in the view are added (using try/catch instead of the ternary operator), the debugger is now suspending the flow when the app starts, because of the handled exception.
Steps to reproduce
1) Create new Alloy project
2) open index.xml and replace "doClick" with "exports.doClick"
3) open index.js and replace "function doClick(e)" with "exports.doCLick = function(e)"
4) Run the app
The resulting file will contain:
try {
$.__views.label.addEventListener("click", exports.doClick);
} catch ( e ) {
__defers["$.__views.label!click!exports.doClick"] = true;
}
Previously, this was handled using a ternary operator, thus avoiding the try/catch.
The try/catch method was implemented in order to allow arbitrary namespacing and JS in general to be used for identifying event handlers from markup. It resolved issues that were a problem with the prior method, resolved in ALOY-665. It is also noted that the user found a workaround for their particular situation. Finally, you can disable the behavior where Studio stops on exceptions by changing the setting like this: * Open Studio * Go to "Preferences -> Studio -> Javascript Debug" * Uncheck the "suspend" options until the desired behavior is met. Given the above, I'm going to close this ticket.