Problem description
Android and iOS behave in a different way when setting breakpoints on function declaration.
See sample code:
var win = Ti.UI.createWindow({
backgroundColor:'blue'
});
function test(){
alert('foobar');
};
var view = Ti.UI.createView({
height:200,
width:200,
backgroundColor:'orange'
});
view.addEventListener('click', function(){
test();
});
win.add(view);
win.open();
If a breakpoint is set on line 5 ( function test(){ ) , on Android it actually breaks at line 6 after triggering the 'click' event on the view.
On iOS it breaks on line 5.
If setting breakpoints for both lines 5 and 6, on Android it only breaks once at line 6, while on iOS it breaks for both.
If setting breakpoints both on line 6, it works correctly as expected for both the platforms.
No comments