Project: titanium
Issue TIMOB-17629: Debugger does not stop at the correct breakpoint/position
When I debug my application, I need to place the breakpoint exactly one line below the one I want to debug at. This is very frustrating and makes debugging really unpleasant. The only exception is file app.js for which breakpoints seems to be handled corectly. The following code illustrates the problem: {code:title=app.js|borderStyle=solid} if (Ti.version < 1.8) { alert('Sorry - this application template requires Titanium Mobile SDK 1.8 or later'); } var myVar = 5; var yourVar = 6; var thirdVar = myVar + yourVar; var my = require("MyDir/MyThing").MyThing(); my.invoke(); {code} Putting a break point behaves correctly for above file (app.js). {code:title=MyThing.js|borderStyle=solid} exports.MyThing = function() { var Me = this; var first = 35; var second = false;	function myFunc() {	var a = 5 + 3;	return a + 2 + 3;	}	this.invoke = function() {	var b = 7;	return myFunc();	};	return this; }; {code} However for the second file, if I need to stop at line 9 I will need to place the breakpoint at line 10. More over, if I need to stop at line 10 I need to put the breakpoint at line 11 which really does not make sence. Attached is a sample project.
Story points: 3