There's no need to manually step through your code to build a mental model
of its execution and data flow. Use AppLand to navigate a holistic mapping
of your application's execution and drop into source code where necessary.
The call tree flows from left to right, top to bottom. When a function
makes a call to another function, it will have an outbound link from left
to right. Additional function calls from the same caller will flow
downwards. In the example below,
calls two functions:
in their respective order.
Try using the arrow buttons above to walk the call stack. Similar controls
can be found in the scenario view at the top of the "Timeline" panel.
Data flow and details
AppLand keeps a record of every argument passed into and returned from a
function call. This information can be used to identify incorrect
parameters, mutations and data flow. Trace values back to their origin or
follow their propagation through the call stack.
In the Scenario view, a function call can be selected to display
additional details in the right side panel. Use this window to see
function arguments, return values, SQL and exceptions. You can also click
on a value port to see the value it contains. Colored links connect two
ports where values are passed from one function to another.
Try clicking on a value port to see the value recorded.
When it comes to database queries, it's not always clear what queries are
being executed from where. This is especially true when constructing
queries programmatically through an abstraction layer such an ORM. AppLand
records SQL queries as they're executed, capturing a detailed context
about the query and its surrounding application logic and data flow. Use
this view to identify unexpected calls, queries, parameters or results.
AppLand depicts functions which exit early due to an exception. Bugs
introduced during exception handling can oftentimes be hard to spot,
especially when an exception is silently handled in an unexpected
location. Use this view to easily identify and trace an exception from its
origin its handler.
Exceptions are indicated by a
symbol in the top right of a function call.
Practice testing your mental model against the data that AppLand captures.
It's not uncommon to find unexpected behavior where you least expect it.