Feature request
The problem
In titanium studio, when an exception happens while debugging, the debugger breaks out, but there no messages to see the exception that caused the break.
Reproducible steps:
1.Run the code below in debug mode.
Expected behavior
When you run the application in debug mode customer expects to see a message of an exception.
Sample Code:
// this sets the background color of the master UIView (when there are no windows/tab groups on it)
Titanium.UI.setBackgroundColor('#000');
// create tab group
var tabGroup = Titanium.UI.createTabGroup();
//
// create base UI tab and root window
//
var win1 = Titanium.UI.createWindow({
title:'Tab 1',
backgroundColor:'#fff'
});
var tab1 = Titanium.UI.createTab({
icon:'KS_nav_views.png',
title:'Tab 1',
window:win1
});
var label1 = Titanium.UI.createLabel({
color:'#999',
text:'I am Window 1',
font:{fontSize:20,fontFamily:'Helvetica Neue'},
textAlign:'center',
width:'auto'
});
//Lines added to simulate the problem
var a=b+1;
label1=a;
win1.add(label1);
//fetching the xml data and puting into the table
// create controls tab and root window
//
var win2 = Titanium.UI.createWindow({
title:'Tab 2',
backgroundColor:'#fff'
});
var tab2 = Titanium.UI.createTab({
icon:'KS_nav_ui.png',
title:'Tab 2',
window:win2
});
var label2 = Titanium.UI.createLabel({
color:'#999',
text:'I am Window 2',
font:{fontSize:20,fontFamily:'Helvetica Neue'},
textAlign:'center',
width:'auto'
});
win2.add(label2);
//
// add tabs
//
tabGroup.addTab(tab1);
tabGroup.addTab(tab2);
// open tab group
tabGroup.open();
Helpdesk
APP-996717
Max, thoughts?
Stephen, iOS debugger needs to report 'exception' variable on top stack frame when suspend caused by an exception. The variable flags should be 'e' and optionally 'w' is you could allow user to change or drop the exception (like Firefox does). Here is Firefox related code: https://github.com/aptana/studio3/blob/development/browser.extensions/debugger.aptana.com/content/aptanadebugger/aptanaDebugger.js#L1642 Same should apply to Android, if applicable.
Max, Marshall requests that we update the protocol wiki to describe this behavior. Once we have that, we'll file bugs against the various platforms.
Francisco, can you see if this also happens on Android?
Debugger protocol wiki has beed updated regarding the exception handling. http://wiki.appcelerator.org/display/tis/Debugger+Protocol#DebuggerProtocol-Specialvariables
Tested with 2.0.1GA2, when running the iOS simulator in 'normal' mode, it prints the issue in the console. But if you run it in debug mode, nothing is shown, no exception thrown.
Resolving as cannot reproduce. Needs confirmation by QE before closing.
Closing ticket as the issue cannot be reproduced and due to the above comments.