Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-13251] Alloy Debugger: wrong behavior setting breakpoints on functions under Android

GitHub Issuen/a
TypeBug
PriorityCritical
StatusClosed
ResolutionFixed
Resolution Date2013-03-28T21:48:38.000+0000
Affected Version/sRelease 3.0.0, Release 3.1.0
Fix Version/sRelease 3.1.0, 2013 Sprint 07 Core, 2013 Sprint 07
ComponentsAndroid
Labelsqe-3.1.0
ReporterFederico Casali
AssigneeMax Stepanov
Created2013-03-27T21:02:17.000+0000
Updated2017-03-09T18:54:03.000+0000

Description

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

Attachments

FileDateSize
androidAlloyDebugger.png2013-03-27T21:02:17.000+000043347
androiddebugger.log2013-03-27T21:02:17.000+00003133
build.log2013-03-27T21:20:36.000+000018399
iOSalloyDebugger.png2013-03-27T21:02:17.000+000037276

Comments

  1. Dustin Hyde 2013-03-27

    The breakpoint inside the function is acting as if the breakpoint is next to the function.
  2. Shalom Gibly 2013-03-28

    Moved to TIMOB - Seems to be a bug in the platform.
  3. Max Stepanov 2013-03-28

    PR https://github.com/appcelerator/titanium_mobile/pull/4050
  4. Max Stepanov 2013-03-28

    Line numbers in required modules are off by 1.
  5. Lee Morris 2017-03-09

    Closing ticket as fixed.

JSON Source