Uploaded image for project: 'Titanium SDK/CLI'
  1. Titanium SDK/CLI
  2. TIMOB-10996

iOS: Debugger: CommonJS Require: debugger skips local assignments in commonjs modules

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Low
    • Resolution: Invalid
    • Affects Version/s: Release 2.1.2, Release 3.0.0
    • Fix Version/s: None
    • Component/s: iOS
    • Environment:

      Titanium Studio: 2.1.2, 3.0.0
      Titanium SDK: 2.1.2.GA, 3.0.0.v20120917105713
      OS: Mountain Lion 10.8
      Xcode: 4.4/4.5
      Devices Tested: iPhone Simulator 5.1/6.0

      Description

      Debugger skips local assignments in commonjs modules.

      For instance, if the debugger steps over this commonjs module line by line:

      Ti.API.info('require(\'myrequire\')');
       
      var myRequireLocal = 'myRequireLocal';
       
      exports.myFunction = function()
      {
      	Ti.API.info('myrequire.myFunction()');
      	
      	myRequireLocal = 'newValue';
      };
      

      'var myRequireLocal = 'myRequireLocal'' and 'exports.myFunction = function()' will be skipped by the debugger.

      Attached sample project 'MyProject' (includes js files and breakpoint at line 1).
      Attached separate js files (app.js, myrequire.js, and myinclude.js) for reference (same as in 'MyProject.zip').
      Attached debugger protocol log: 'iosdebugger.log'
      Attached studio/console logs: 'ios_debugger_console_log.txt' and 'ios_debugger_studio_log.txt' for reference.

      Steps to Reproduce:

      1. Run MyProject in debugger.
      2. Step into every line in app.js, and step over every line in myrequire.js and myinclude.js.

      Actual Result:

      The assignment statements in myrequire.js are never hit by the debugger.

      Expected Result:

      Every assignment statement in myrequire.js should be hit (the line marker will pause and the values pane will be populated).

        Attachments

        1. app.js
          0.1 kB
        2. ios_debugger_console_log.txt
          0.9 kB
        3. ios_debugger_studio_log.txt
          20 kB
        4. iosdebugger.log
          11 kB
        5. myinclude.js
          0.2 kB
        6. MyProject.zip
          2.98 MB
        7. myrequire.js
          0.2 kB

          Activity

            People

            • Assignee:
              emerriman Eric Merriman
              Reporter:
              dhyde Dustin Hyde
            • Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Backbone Issue Sync

                • Titanium SDK/CLI <> Titanium Mobile
                  Synced with:
                  TIMOB-14335
                  Sync status:
                  ERROR
                  Last received:
                  Last sent:

                  Git Integration