Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-11661] iOS: Debugger: can't step-into win.open to view win.url javascript file

GitHub Issuen/a
TypeBug
PriorityLow
StatusClosed
ResolutionInvalid
Resolution Date2016-10-11T04:29:55.000+0000
Affected Version/sRelease 2.1.3, Release 3.0.0
Fix Version/sn/a
ComponentsiOS
Labelsdebugger, debugger-ios, qe-ios100112
ReporterDustin Hyde
AssigneeAngel Petkov
Created2012-11-02T23:35:47.000+0000
Updated2016-10-11T04:30:01.000+0000

Description

Can't step-into win.open() to view win.url javascript file. However any breakpoints in the file are hit. Steps to Reproduce: 1. Run code in Debug mode: app.js
/* Ti.include */

Ti.API.info('Ti.include(\'module.js\')');

Ti.include('module.js');

/* require */

Ti.API.info('require(\'module\')');

require('module');

/* Ti.UI.Window.url */

Ti.API.info('win.url.open()');

var win = Ti.UI.createWindow({
	url : 'module.js',
	backgroundColor : 'red'
});

win.open();

/* alert */

alert('alert');
module.js
/* console */

if(Ti.Platform.osname != 'android') // TIMOB-11294 - Android: console: log functions fail in commonjs require
{
	console.log('console LOG');
	console.log(['console LOG', 'ARG1', 'ARG2']);
	 
	console.debug('console DEBUG');
	console.debug(['console DEBUG', 'ARG1', 'ARG2']);
	 
	console.info('console INFO');
	console.info(['console INFO', 'ARG1', 'ARG2']);
	 
	console.warn('console WARN');
	console.warn(['console WARN', 'ARG1', 'ARG2']);
	
	console.error('console ERROR');
	console.error(['console ERROR', 'ARG1', 'ARG2']);
}
else
{
	Ti.API.info('TIMOB-11294 - Android: console: log functions fail in commonjs require');
}

/* Ti.API */
 
Ti.API.trace('Ti.API TRACE');
Ti.API.trace(['Ti.API TRACE', 'ARG1', 'ARG2']);
 
Ti.API.debug('Ti.API DEBUG');
Ti.API.debug(['Ti.API DEBUG', 'ARG1', 'ARG2']);
 
Ti.API.info('Ti.API INFO');
Ti.API.info(['Ti.API INFO', 'ARG1', 'ARG2']);
 
Ti.API.warn('Ti.API WARN');
Ti.API.warn(['Ti.API WARN', 'ARG1', 'ARG2']);
 
Ti.API.error('Ti.API ERROR');
Ti.API.error(['Ti.API ERROR', 'ARG1', 'ARG2']);
 
/* Ti.API.log */
 
Ti.API.log('TRACE', 'Ti.API.log TRACE');
Ti.API.log('TRACE', ['Ti.API.log TRACE', 'ARG1', 'ARG2']);
 
Ti.API.log('DEBUG', 'Ti.API.log DEBUG');
Ti.API.log('DEBUG', ['Ti.API.log DEBUG', 'ARG1', 'ARG2']);
 
Ti.API.log('INFO', 'Ti.API.log INFO');
Ti.API.log('INFO', ['Ti.API.log INFO', 'ARG1', 'ARG2']);
 
Ti.API.log('WARN', 'Ti.API.log WARN');
Ti.API.log('WARN', ['Ti.API.log WARN', 'ARG1', 'ARG2']);
 
Ti.API.log('ERROR', 'Ti.API.log ERROR');
Ti.API.log('ERROR', ['Ti.API.log ERROR', 'ARG1', 'ARG2']);
 
Ti.API.log('LOG', 'Ti.API.log LOG');
Ti.API.log('LOG', ['Ti.API.log LOG', 'ARG1', 'ARG2']);
 
/* Ti.iOS.API */
 
if(Ti.Platform.osname == 'iphone' || Ti.Platform.osname == 'ipad')
{
    Ti.API.timestamp('Ti.API TIMESTAMP');
    Ti.API.timestamp(['Ti.API TIMESTAMP', 'ARG1', 'ARG2']);
}
2. Add a breakpoint near the beginning and step-over unti you hit win.open(); 3. Step into win.open(); Actual Result: Skips over win.url javascript file. There seems to be no way to debug into this file without pre-existing breakpoints in the file. Expected Result: Stepping into win.open() seems like it should hit the first line of the win.url javascript file ('module.js').

Comments

  1. Harry Bryant 2015-12-01

    I am still able to reproduce this error using the following components:
       Mac OSX El Capitan: 10.11.1 (15B42)
       Ti SDK: 5.2.0.v20151201075557
       Appc NPM: 4.2.2
       Appc CLI: 5.1.0
       Xcode 7.1(7B91b)
       Node v4.2.2
       
    Attempting to step into win.open() does not produce the expected result.
  2. Angel Petkov 2016-03-16

    Hello, the url property was deprecated in 3.6.0 see [here](https://docs.appcelerator.com/platform/latest/#!/api/Titanium.UI.Window-property-url) which is why the debugger function to step in to a url open call was never fixed and re-added. Closing as invalid.

JSON Source