Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Find unused source code using the debugger

Find unused source code using the debugger

Scheduled Pinned Locked Moved C / C++ / MFC
csharpdebuggingdelphivisual-studiohelp
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • F Offline
    F Offline
    Florian Storck
    wrote on last edited by
    #1

    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

    A 1 Reply Last reply
    0
    • F Florian Storck

      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

      A Offline
      A Offline
      Alexander M
      wrote on last edited by
      #2

      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! ;-)

      F 1 Reply Last reply
      0
      • A Alexander M

        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! ;-)

        F Offline
        F Offline
        Florian Storck
        wrote on last edited by
        #3

        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

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups