Uploaded image for project: 'Appcelerator Studio'
  1. Appcelerator Studio
  2. TISTUD-9174

Debugger: Breakpoints set in alloy /lib files do not get hit

    Details

    • Type: Bug
    • Status: Closed
    • Priority: None
    • Resolution: Fixed
    • Affects Version/s: Release 5.1.3
    • Fix Version/s: Release 5.1.3
    • Component/s: Alloy, Debugging
    • Labels:
      None
    • Environment:

      Studio: 5.1.3.201905231615

      Description

      Description

      I'm not familiar enough with the debugger to say whether this worked previously, I tried searching jira and the zephyr tests but couldn't find anything related. So this may well be an improvement not a bug

      When debugging an alloy app, I set a breakpoint in a file under lib, then called a function from this file. The breakpoint was not hit. If I set a breakpoint on where I call the function and step in, Studio does not open the file under lib, but instead opens a file representing the file under Resources. When setting the breakpoint I get the below log

      !ENTRY com.appcelerator.titanium.core 2 0 2019-05-29 11:48:36.315
      !MESSAGE (Build 5.1.3.201905231615) [WARNING]  Unable to resolve URI of breakpoint: JSDebugLineBreakpoint on [marker=Marker [on: /debuggeralloy/app/lib/test.js, id: 40757, type: com.aptana.debug.core.lineBreakpointMarker, attributes: [lineNumber: 2, message: JS breakpoint [/debuggeralloy/app/lib/test.js,line: 2], org.eclipse.debug.core.enabled: true, org.eclipse.debug.core.id: com.aptana.js.debug.core], created: 29/05/2019, 11:48]]
      

      Steps to reproduce

      1. In an alloy app create a file test.js under lib with the below contents, set a breakpoint on line 2 (var x = 1;)

      exports.test = function () {
      	var x = 1;
      	var c = 2;
       
      	var z = x + c;
      	return z;
      };
      

      2. Change the controllers/index.js code to the below

      var test  = require('test');
      function doClick(e) {
      	test.test();
      	alert($.label.text);
      }
      $.index.open();
      

      3. Run the debugger to android or iOS
      4. Click the label in the app
      5. Set a breakpoint on line 3 of controllers/index.js (test.test();)
      6. Click the label in the app
      7. Step through the code

      Actual

      On step 4 the breakpoint is not hit.
      On step 7 when stepping through the code the file under Resources is opened, not lib

      Expected

      On step 4 the breakpoint should be hit
      On step 7 it should open the file under lib

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                cwilliams Christopher Williams
                Reporter:
                eharris Ewan Harris
              • Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: