[TIMOB-11173] Android: Debugger: breakpoint at global unassigned variable declaration hits next statement instead
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Low |
Status | Closed |
Resolution | Invalid |
Resolution Date | 2017-07-10T22:17:18.000+0000 |
Affected Version/s | Release 2.1.2, Release 2.1.3, Release 3.0.0 |
Fix Version/s | n/a |
Components | Android |
Labels | debugger, qe-and090112 |
Reporter | Dustin Hyde |
Assignee | Eric Merriman |
Created | 2012-09-26T20:42:00.000+0000 |
Updated | 2017-07-10T22:17:18.000+0000 |
Description
Breakpoints at global unassigned variable declarations are skipped and hit at next statement instead. However, unassigned variable declarations in anonymous functions are correctly hit.
For example:
var deadVar1; // breakpoint
Ti.API.info('Global Variables Defined!');
(function(){
var deadVar2; // breakpoint
Ti.API.info('Anonymous Function Called!');
})();
alert('App Exited!');
Running this code in debug mode will result in the first breakpoint being hit at the next statement (e.g., 'var deadVar1' stops at 'Ti.API.info('Global Variables Defined!')').
Steps to Reproduce:
1. Run code in debug (manually insert breakpoints as per code comments):
var deadVar1; // breakpoint
Ti.API.info('Global Variables Defined!');
(function(){
var deadVar2; // breakpoint
Ti.API.info('Anonymous Function Called!');
})();
alert('App Exited!');
Actual Result:
App skips the first breakpoint, but stops at the next statement.
Pressing 'Resume' will correctly hit the unassigned variable in the anonymous function.
Expected Result:
The first breakpoint should be hit and pressing 'Resume' should hit the next breakpoint.
Here is the expected console log for the sample code:
[INFO] Global Variables Defined!
[INFO] Anonymous Function Called!
Attachments
File | Date | Size |
---|---|---|
androiddebugger.log | 2012-09-26T20:42:00.000+0000 | 3598 |
app.js | 2012-09-26T20:42:00.000+0000 | 188 |
console-log.txt | 2012-09-26T20:42:00.000+0000 | 83 |
iosdebugger.log | 2012-09-26T20:42:00.000+0000 | 1980 |
MyProject.zip | 2012-09-26T20:42:00.000+0000 | 3122581 |
Closing ticket due to time passed and lack of progress for a number of years. Please open a new ticket if there are any problems.