This study aims to provide a comprehensive and in-depth investigation of the debugging process in programming teaching in terms of cognitive and metacognitive aspects, based on programming students who demonstrate low, medium, and high programming performance and to propose instructional strategies for scaffolding novice learners in an effective way. Data were collected from 41 novice programming students from C++ and Python programming language courses of the same instructor in the scope of case study methodology, and data instruments included paper-based programming questions. The questions were framed under three categories as questions' difficulty levels (low, moderate and high), error types (syntax and logic), and question types (if-else and while). As having three categories, a total of 12 different data (3x2x2) were taken from each student, which means 492 data rows were evaluated in the study. Chi-square test results revealed that while error detection and correction are significantly high in low difficulty level questions, error detection and error correction attempts for logic errors were substantially higher compared to syntax errors. Further analysis conducted for paper-based markings that were used by students throughout their error detection, correction, and completion attempts. Chi-square test results revealed significant relationships between marking availability and error types, as well as difficulty levels. Results were discussed for both traditional learning and e-learning environments in terms of what kind of educational implications and strategies can be outlined by data for increasing the effectiveness of programming education for novice learners.