I have found the cognitive/metacognitive divide useful. http://www.education.auckland.ac.nz/learning/tech/ict/education/it6.asp Metacognition can be described simply as learning how to learn. A key component of metacognition is the opportunity to reflect on how a problem was solved and whether that strategy can be generalised.
Teaching for Transfer D. N. Perkins and Gavriel Salomon http://www.lookstein.org/integration/curriculum_transfer.htm talks of near and far transfer and the transfer mechanisms “low road/high road” model of transfer. High road transfer is a beast like metacognition and requires time to reflect and abstract general principles from the activity of game programming.
The paper suggests "Hugging" for near transfer and “Bridging” for far transfer. Bridging "means teaching so as to meet better the conditions, for high road transfer. Rather than expecting students to achieve transfer spontaneously, one “mediates” the needed processes of abstraction and connection (Delclos et al. 1985, Feuerstein 1980). For example, teachers can point out explicitly the more general principles behind particular skills or knowledge, or better, provoke students to attempt such generalizations themselves"
Finally, I have found Bloom's Taxonomy useful in identifying what the higher order cognitive skills might be for which we seek "far, high road transfer" http://www.nwlink.com/~donclark/hrd/bloom.html
Bloom breaks up the cognitive domain into 6 categories: Knowing Comprehending Applying Analysing Synthesising Evaluating
I think the skills we seek are in the last 2 categories, synthesis and evaluation. Fortunately this is where students spend most of their time in the debugging cycle of implement/test/debug.
Which brings me back to cognitive conflict. Cognitive conflict is an essential part of the debug cycle, its also an important aspect of Metacognitive theory. So I think that Metacognitive theory, high road transfer and Bloom's taxonomy are pretty much talking about the same thing.
And the take home message: allow students to spend as much time as possible in a state of cognitive conflict as they synthesise and evaluate solutions while giving them the opportunity to abstract generalised rules from the exercise.