Find unused source code using the debugger
-
Hi, I'm wondering whether Visual Studio .Net 2002/2003 has a similar feature, which I used sometimes in Borland CBuilder quite extensively. When debugging an application, all valid breakpoints were marked in the debugger view of the source editor. This way, one could easily find unused / never called functions. Visual Studio only sets a breakpoint to the next valid position, if one accidentially tries to set a breakpoint to an unused codesection. Is there an easy solution to setting up the editor to show all compiled codelines ? Or are there any AddIns, which manage that? This would be a great help for code cleanup, when trying to remove unused #idef switches, functions, etc. Thanks, Florian
-
Hi, I'm wondering whether Visual Studio .Net 2002/2003 has a similar feature, which I used sometimes in Borland CBuilder quite extensively. When debugging an application, all valid breakpoints were marked in the debugger view of the source editor. This way, one could easily find unused / never called functions. Visual Studio only sets a breakpoint to the next valid position, if one accidentially tries to set a breakpoint to an unused codesection. Is there an easy solution to setting up the editor to show all compiled codelines ? Or are there any AddIns, which manage that? This would be a great help for code cleanup, when trying to remove unused #idef switches, functions, etc. Thanks, Florian
VS.NET does not need to detect unused routines because in release mode they are not included in the executable (removed by the linker). Don't try it, just do it! ;-)
-
VS.NET does not need to detect unused routines because in release mode they are not included in the executable (removed by the linker). Don't try it, just do it! ;-)
Hi, Alexander M. wrote: VS.NET does not need to detect unused routines because in release mode they are not included in the executable (removed by the linker). well, that's not my main problem. I want to use the information what is NOT compiled to do some refactoring and cleanup of the source code. Therefore it would be extremely useful to see all codelines marked, which are really existing in the binaries. Of course, this is just one small step into refactoring old code. Any tools or settings known to achieve this ? This was really nice in CBuilder. Bye, Florian