We have a class in which mainly data processing(XML nodes) is done by mainly 3 methods. Now code in itself strictly follows DRY principle. For e.g.
- Process Children (reads data from child nodes)
- Process Choose Element (conditional data check)
- Extract Single Field (extract data from single node with no children)
To give you overview ,Say we reach node A, then we call ProcessChildren()
and if any children is Choose
then we would call ProcessChoose()
. Then we would call recursively ProcessChildren()
result and so worth.
Though this code is easy to read and overall bugs are removed but debugging is very difficult since one functions to another and so on.
Is there any way we could remove this debugging hurdle so that debugging is easy?