Search code examples
bixbybixbystudio

How can I debug issues related to lazy-properties?


I'm unable to see any logs related to the lazy-source Action that is defined in lazy properties.


Solution

  • Lazy properties, defined by the lazy-source key are populated only when necessary. The lazy property is associated with a Fetch Action, which is called asynchronously and on demand, to populate the lazy property. Bixby would call this Action, for example, in Details layouts or specific dialogs for structures.

    At the moment, any debugging information related to this Fetch Action is not available in the debugger. 

    Details The ability to debug lazy properties is currently not available in the IDE. There are plans to implement it in the future but no timeline is available at the moment.

    Workaround Developers can workaround this issue by creating a custom intent that they can run in the simulator. This will then show the related information in the debugger.  

    In the following example, WineDescription is a lazy property of the Concept Wine that is populated by the Action GetWineDescription. Wine is returned as the Output by the Action FindWine. To get the debugger to show up information related to GetWineDescription, here is the custom intent:

    intent {
     goal: WineDescription
     subplan {
     goal: Wine
     route: FindWine 
     }
    }