Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-11307] Android Debugger: Breakpoints not recognized on files that are added to app.js using URL

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2012-10-18T01:50:38.000+0000
Affected Version/sRelease 3.0.0
Fix Version/sRelease 3.0.0, Release 3.1.0, 2012 Sprint 21 Core, 2012 Sprint 21
ComponentsAndroid
Labelscore, debugger, qe-and100112, qe-port, qe-testadded
ReporterPragya Rastogi
AssigneeBill Dawson
Created2012-10-05T08:40:13.000+0000
Updated2015-02-25T19:22:36.000+0000

Description

This is a regression issue. It does not occur in 2.1.3.GA Steps To Reproduce: 1. create app with code below. 2. Put a breakpoint on any line in newWin.js file. 3. Run the app using SDK 3.0 in debug mode(Emulator or Device). 4. Click Test button. Actual: Breakpoint is not recognized in newWin File. Variables tab appear blank. Console output shows nothing. Expected: Breakpoint must get hit. Console and Variables tab must work as expected. app.js
var win = Ti.UI.createWindow({
  backgroundColor: 'blue'
});
 
//var ui = require('ui');

var button = Ti.UI.createButton({
  title: 'Test',
  top: 20,
  height: 50,
  width: 200
});
button.addEventListener('click', function(e){
  var newWin = Ti.UI.createWindow({url:'newWin.js'});
newWin.open();
});
win.add(button);
win.open();
newWin.js
var win = Ti.UI.currentWindow;
win.backgroundColor = 'white';
var x = 1;
Ti.API.info("hi");

Attachments

FileDateSize
androiddebugger.log2012-10-09T00:16:08.000+00002484
iosdebugger.log2012-10-09T00:16:08.000+00002506

Comments

  1. Dustin Hyde 2012-10-05

    Is this Android or iOS? Is this an SDK bug or a Studio bug?
  2. Michael Xia 2012-10-07

    Hi Pragya, Several questions: 1. Do you see this for both Android and iOS debugging? 2. Do you see this when using Studio 3.0.0 but switching to 2.1.3 SDK? 3. Do you see this when using Studio 2.1.2 with SDK 3.0.0? Thanks.
  3. Dustin Hyde 2012-10-09

    This does NOT occur in Studio 3.0 using iOS Simulator with SDK 2.1.3 or 3.0.0.X. This DOES occur in Studio 3.0 using Android Device with SDK 3.0.0.X. This appears to be a long-standing Android issue. Attaching logs. Sample code: app.js
       var win = Ti.UI.createWindow({
       	url : 'win.js'
       });
       
       win.open();
       
    win.js
       var win = Ti.UI.currentWindow;
       
       win.backgroundColor = 'white'; // breakpoint
       
    Steps to Reproduce: 1. Run code (add breakpoint on specified line). Actual Result: Nothing happens. Expected Result: Breakpoint should be hit.
  4. Max Stepanov 2012-10-15

    Suggested that this regression could be caused by https://github.com/appcelerator/titanium_mobile/commit/f029b6609c06aba8651f0f57296de04deb706f4f
  5. Bill Dawson 2012-10-18

    master PR ready: https://github.com/appcelerator/titanium_mobile/pull/3278
  6. Bill Dawson 2012-10-18

    3_0_X PR ready: https://github.com/appcelerator/titanium_mobile/pull/3281
  7. Satyam Sekhri 2012-12-08

    Verified on: Titanium Studio: 3.0.0.201211301903 Titanium SDK:3.0.0.v20121204181658 iOS Simulator (v6.0), Android Emulator (v2.2), Samsung Galaxy Note (v2.3.6)

JSON Source