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. Debugging Recursive functions

Debugging Recursive functions

Scheduled Pinned Locked Moved C / C++ / MFC
debuggingc++tutorialquestion
2 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.
  • J Offline
    J Offline
    John Cruz
    wrote on last edited by
    #1

    can anyone tell me how to debug and test recrusive functions??? i have trying putting trace statements and using the VC++ debugger but i always get lost on what i was doing. i trying looking at the call stacks but it is useless. Can anyone tell me what's the most efficient and the most easiest way to debug my recrusive function???? Thank you very much, John :-D Aloha from Hawaii :-)

    P 1 Reply Last reply
    0
    • J John Cruz

      can anyone tell me how to debug and test recrusive functions??? i have trying putting trace statements and using the VC++ debugger but i always get lost on what i was doing. i trying looking at the call stacks but it is useless. Can anyone tell me what's the most efficient and the most easiest way to debug my recrusive function???? Thank you very much, John :-D Aloha from Hawaii :-)

      P Offline
      P Offline
      Paul M Watt
      wrote on last edited by
      #2

      I like to put a static nesting counter in temporarily to tell how many iterations deep I am. If a problem appears, I record how many levels deep I am, then it becomes easier to set breakpoints for the particular iteration. Other than that I like to initialize the values in the function during runtime to test all of my exit cases.

      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