Problem description
Debugger is not correctly handling a breakpoint set for a function in the controller .js file
Steps to reproduce
Android OS tested: 2.3.6 Nexus One, Android emulator
See the sample attached.
index.xml
<Alloy>
<Window class="container">
<Label id="label" onClick="doClick">Hello, World</Label>
</Window>
</Alloy>
index.js
function doClick(e) {
alert($.label.text);
}
$.index.open();
1. Set a BreakPpoint at line 3 for the'alert($.label.text);'
2. Debug the App on Android
Result: App starts but the breakpoint is immediately triggered before displaying the Window (so just the splashscreen is displayed) and without having to click on the label.
From the Debug tab, it looks the behavior is wrong and that actually the wrong line is highlighted, focusing on the 'doClick() function' instead of the 'alert' function inside.
See the two screenshots, one for Android (wrong behavior), one for iOS (correct one, being triggered only when clicking on the sample 'label' for displaying the alert, not when starting the App).
3. Click to go past the breakpoint. Manually click on the app label to trigger the alert again.
Result: breakpoint is now ignored. Alert is being displayed.
Attaching Debugger log, where there is this line (not present in the iOS debugger log):
[57:33.986] Recv: >1364417853985*!unknown option <monitorXHR><
Attaching Android build.log too
The breakpoint inside the function is acting as if the breakpoint is next to the function.
Moved to TIMOB - Seems to be a bug in the platform.
PR https://github.com/appcelerator/titanium_mobile/pull/4050
Line numbers in required modules are off by 1.
Closing ticket as fixed.