I'm trying to fix bugs in a very large C# code base that I'm not familiar with, so I often have trouble locating the piece of code that needs to be updated (there's no internal documentation and very few comments in the code)
I would love to have a general technique or procedure whereby I could:
- run the application
- use it in a specific way (ie. replicate a bug) & close it
- determine which methods and lines of code were executed
- remove all 'initialization' code that's common to all usage of the app
I've tried looking at code coverage results from dotCover, but it wasn't too helpful because a ton of code gets invoked at the beginning just to launch the app. It would be great if I could remove the 'common code' and only see coverage results past a certain point in execution.
I just remembered that dotCover lets you "re-start" profiling at an arbitrary point of execution. The solution I was looking for is given directly in their manual:
Recording Coverage of Manual Test Session