Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-4163] Android: Debugger: Manual suspend is not implemented

GitHub Issuen/a
TypeBug
PriorityLow
StatusReopened
ResolutionUnresolved
Affected Version/sRelease 1.7.0
Fix Version/sn/a
ComponentsAndroid
LabelsRTN, debugger, step_into, suspend
ReporterNatalie Huynh
AssigneeIngo Muschenetz
Created2011-05-20T13:08:58.000+0000
Updated2020-01-09T19:51:38.000+0000

Description

Try to manually suspend a thread (by hitting the "Pause" button) when debugging an application with TiStudio. The app should suspend once Javascript code is executed again.

Comments

  1. Don Thorp 2011-05-20

    Moving to critical since it's MUST FIX
  2. Marshall Culpepper 2011-05-24

    Hrmm.. "Step into" seems to be enabled correctly for me here. The breakpoint is supposed to be set on the line where the function "cfa()" is called, correct? When the debugger suspends, I go directly into that function when I click on "step in"
  3. Marshall Culpepper 2011-06-29

    To test this: Debug an android project in TiStudio, make sure the project is targeting the MobileSDK w/ these fixes. Set a breakpoint anywhere, and make sure it hits once. Once it hits, resume, and then you can click on any thread under the App, and hit the manual "Suspend" (Pause) button. The next time the app goes back to javascript code, the debugger should suspend.
  4. Bill Dawson 2011-07-05

    Bill's test case with a tabbed application:
       // 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:'Click first',
       	font:{fontSize:20,fontFamily:'Helvetica Neue'},
       	textAlign:'center',
       	width:'auto'
       });
       function clicker() {
       	Ti.API.info("Clickity do da");
       	Ti.API.info("Clickity day");
       }
       label1.addEventListener('click', clicker);
       
       win1.add(label1);
       
       var label2;
       win1.add ( label2 = Ti.UI.createLabel({
       	bottom: 5, left: 0, right: 0, backgroundColor: 'green', color: 'white', text: 'click later'
       }));
       function clicker2() {
       	Ti.API.info('clicker 2 xxx');
       	Ti.API.info('clicker 2 yyy');
       }
       label2.addEventListener('click', clicker2);
       
       tabGroup.addTab(tab1);  
       tabGroup.open();
       
    Steps: 1) Put a breakpoint in "clicker()", which is an event handler that gets run when you click on the "click first" label. 2) Run the app in debug mode. 3) When the app has opened, click the "click first" label. A breakpoint should be hit. 4) Resume the app. 5) Click Pause (suspend). 6) Click the bottom label titled "click later". Expected: Suspend in clicker2(), an event handler for the click event of the second (bottom) label. Actual: Doesn't suspend.
  5. Natalie Huynh 2011-07-07

    Tested with 1.7.2.v20110706211037 with Debugger test and the attached test case.
  6. Wilson Luu 2012-01-10

    Reopening bug. Bug still persists on: SDK build: 1.8.0.1 Runtime: V8 Titanium Studio, build: 1.0.7.201112281340 OS: Mac OS X Lion, Windows 7, Linux 10.04 Note: Bug does NOT persist on Rhino when running the attached test case and test case 1023 from [Debugger Test Plan](https://wiki.appcelerator.org/display/tp/Debugger+Test+Plan).

JSON Source