I was recently going through the d8cards set of exercises to test my knowledge of Drupal 8 APIs, as one does in the dev world...
Put simply, or as simply as possible, it consists of a set of 21 exercises, each going over a common Drupal task and how it changes from Drupal 7 to Drupal 8. Card number 4, covering the migration API now semi-bundled with core, gave me enough of a hard time that I had to upgrade my entire development environment to solve it.
Here is a story of how I debugged a Drupal 8 migration entity, first by setting up a CLI Xdebug environment, then by applying debug thinking to hunt down the cause of a bug that was actually a feature. Follow along by opening the Migration 101 d8card. You may wish to attempt the exercise yourself before continuing.
Being a stereotypical overoptimistic coder, I assumed I would breeze through the migration by “borrowing” some example code and adjusting a few variables here and there. Everything worked fine for the actors migration, but when attempting the movies, this was the outcome: