Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-5979] iOS: Unable to view the current exception in the Titanium Studio debugger

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionCannot Reproduce
Resolution Date2014-03-26T20:21:44.000+0000
Affected Version/sRelease 1.7.3, Release 2.0.1
Fix Version/sn/a
ComponentsiOS
Labelscore, supportTeam
ReporterFrancisco Antonio Duran Ramirez
AssigneeIngo Muschenetz
Created2011-08-15T09:12:00.000+0000
Updated2017-03-21T22:06:19.000+0000

Description

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

Comments

  1. Ingo Muschenetz 2011-08-15

    Max, thoughts?
  2. Max Stepanov 2011-08-16

    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.
  3. Ingo Muschenetz 2011-08-22

    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.
  4. Ingo Muschenetz 2011-08-22

    Francisco, can you see if this also happens on Android?
  5. Max Stepanov 2011-11-03

    Debugger protocol wiki has beed updated regarding the exception handling. http://wiki.appcelerator.org/display/tis/Debugger+Protocol#DebuggerProtocol-Specialvariables
  6. Junaid Younus 2012-05-17

    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.
  7. Ingo Muschenetz 2014-03-26

    Resolving as cannot reproduce. Needs confirmation by QE before closing.
  8. Lee Morris 2017-03-21

    Closing ticket as the issue cannot be reproduced and due to the above comments.

JSON Source