Robert Hurlbut Blog

Thoughts on Software Security, Software Architecture, Software Development, and Agility

I also feel Edit and Continue is not the way to go

Friday, August 1, 2003 Comments

 .NET  Extreme Programming 
Share:   Share on LinkedIn    Share on Twitter    Share on Facebook   

I completely agree with Frans in his latest post.

After having used Unit Testing for the last several years, it makes sense that it is a much better way to start checking code. Debugging/stepping through code SHOULD be used as a last resort, not as a first line of defense for code development.

I hate to admit it, but I also have some Visual Basic/VB.Net development under my belt, and I know the IDE lends itself to this kind of development (Edit and Continue). What I have found, is one important contrast between EnC and Unit Tests. With EnC, you may change data on the fly in order to check/test an item, but that particular change is gone once the IDE debugger session is ended. Its not something you can stored in source control for other team members to duplicate later in order to troubleshoot/debug your code. With Unit Tests, I can make the changes, and SAVE those tests. I can create other tests as save them. When another developer looks at my code, they can also create new tests I hadn't thought of to exercise other options and SAVE those.

I am not saying that debugging through an IDE has no purpose/use, but EnC is only valuable to you at the moment of the debug session, and will be worthless 6 months down the line when you come back to fix the code, or worse yet when someone else tries to fix the code.

Please stop with the EnC debate -- its bad practice, period.
Share:   Share on LinkedIn    Share on Twitter    Share on Facebook