Adding on to what hamelj is saying, it’s also very helpful to make use of the logger object to get some extra details into your message log. http://help.objectiflune.com/en/planetpress-connect-user-guide/2018.1/#designer/API/logger_Object.htm
This can be a very powerful and oft overlooked tool when debugging a complicated datamapper.
Furthermore, using the Verify All Records button in the toolbar can be handy for tracking down logical errors in your datamapping. It will report to you exactly which records fail and why. Then, selecting that record, you’ll see the exact step highlighted in red that’s erroring out.
Note, that the step that’s highlighted may not be the cause of the error, it’s just the one that fails as a result of a logical error further up the chain. For example, you may have a repeat step that errors because there’s a goto in the repeat that causes you to skip beyond the text to be evaluated for your end condition. So while this won’t always get you directly to the problem, it at least gets you into the ballpark.