Debugging Transition Matching

Transition rules that don't match one of their constraints don't run. Sometimes it can be confusing to understand why a rule is not executing. That is when you should reach for debug(). It will log to the console the results for each constraint and rule as it executes.

// The inclusion of `this.debug()` below causes the match results to be
// logged to the console, so you can see if this transition is not
// animating because the fromRoute is not 'foo', or because the toRoute
// is not 'bar'.
this.transition(
  this.fromRoute('foo'),
  this.toRoute('bar'),
  this.use('crossFade'),
  this.debug(),
);