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#
  4. Best way to debug

Best way to debug

Scheduled Pinned Locked Moved C#
debuggingcomdata-structureshelpquestion
5 Posts 3 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.
  • T Offline
    T Offline
    Tom Wright
    wrote on last edited by
    #1

    I'm at a position where I cannot step thru my code to see where my problem is at. So I've got message boxes everywhere catching exception. So what is the best way to debug when you can't be there. Right now I'm catching the exception showing the message, the source, and the stack trace. Which I must admit is a little confusing. Any other suggestions. Thanks

    Tom Wright tawright915@yahoo.com

    P E 2 Replies Last reply
    0
    • T Tom Wright

      I'm at a position where I cannot step thru my code to see where my problem is at. So I've got message boxes everywhere catching exception. So what is the best way to debug when you can't be there. Right now I'm catching the exception showing the message, the source, and the stack trace. Which I must admit is a little confusing. Any other suggestions. Thanks

      Tom Wright tawright915@yahoo.com

      P Offline
      P Offline
      Paul Voicu
      wrote on last edited by
      #2

      Why do you say you cannot debug through your code? I think you could use catch (Exception ex) { System.Diagnostics.Trace.WriteLine(ex.Message + " " + ex.StackTrace); }

      T 1 Reply Last reply
      0
      • T Tom Wright

        I'm at a position where I cannot step thru my code to see where my problem is at. So I've got message boxes everywhere catching exception. So what is the best way to debug when you can't be there. Right now I'm catching the exception showing the message, the source, and the stack trace. Which I must admit is a little confusing. Any other suggestions. Thanks

        Tom Wright tawright915@yahoo.com

        E Offline
        E Offline
        Ennis Ray Lynch Jr
        wrote on last edited by
        #3

        It is the most arduous but it really works when it has too.

        A man said to the universe: "Sir I exist!" "However," replied the Universe, "The fact has not created in me A sense of obligation." -- Stephen Crane

        1 Reply Last reply
        0
        • P Paul Voicu

          Why do you say you cannot debug through your code? I think you could use catch (Exception ex) { System.Diagnostics.Trace.WriteLine(ex.Message + " " + ex.StackTrace); }

          T Offline
          T Offline
          Tom Wright
          wrote on last edited by
          #4

          I'm sorry, I meant I cannot step thru my code to see where my problem is at. Reason is this is socket app that requires a secured connection and that is on a network on the east coast.....I'm in the midwest. Currently I am do the try and catch but putting it to a message box instead of the Trace function. I'll try that and see what the results are. Thanks

          Tom Wright tawright915@yahoo.com

          P 1 Reply Last reply
          0
          • T Tom Wright

            I'm sorry, I meant I cannot step thru my code to see where my problem is at. Reason is this is socket app that requires a secured connection and that is on a network on the east coast.....I'm in the midwest. Currently I am do the try and catch but putting it to a message box instead of the Trace function. I'll try that and see what the results are. Thanks

            Tom Wright tawright915@yahoo.com

            P Offline
            P Offline
            Paul Voicu
            wrote on last edited by
            #5

            When you use Trace you can have the code running without pressing the OK of the MessageBox and writing down the message on a piece of paper, while all the messages are going to be written in the Output window, so I would say it's more convenient. I hope it helps. Cheers

            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