Stepping Backwards in Code ( debugger/VS03.net )

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • c# newbie

    #1

    Stepping Backwards in Code ( debugger/VS03.net )

    When stepping through code, to find where an error is thrown, the problem is
    that I have to step threw the statement that causes the error, and if it's
    in a class that's instantiated from the main program, then I may miss the
    statement that causes the error.

    How can I get the debugger to stop right at the statement that causes the
    error.


  • Matt

    #2
    Re: Stepping Backwards in Code ( debugger/VS03.net )

    If the class is part of the same project then you can step into it with F11
    instead of F10 (assuming you are using the default key mapping for VS.Net)


    "c# newbie" <nospam@leave.m e.alone> wrote in message
    news:71d05933f9 599fa93ede76bbd bcd2c0f@news.te ranews.com...[color=blue]
    > When stepping through code, to find where an error is thrown, the problem[/color]
    is[color=blue]
    > that I have to step threw the statement that causes the error, and if it's
    > in a class that's instantiated from the main program, then I may miss the
    > statement that causes the error.
    >
    > How can I get the debugger to stop right at the statement that causes the
    > error.
    >
    >[/color]


    Comment

    • Jeff Callahan

      #3
      RE: Stepping Backwards in Code ( debugger/VS03.net )

      try CTRL + ALT + E, which will take you to the Debug exceptions window.
      there you can tell visual studio to immediately break on any exception or
      any .net exception etc. you can also find this under Debug -> Exceptions...

      let me know if you have other questions or if this doesn't help.

      jeff.

      --

      This posting is provided "AS IS" with no warranties, and confers no rights.
      Use of included script samples are subject to the terms specified at
      http://www.microsoft.com/info/cpyright.htm

      Note: For the benefit of the community-at-large, all responses to this
      message are best directed to the newsgroup/thread from which they
      originated.

      Comment

      • Aaron Queenan

        #4
        Re: Stepping Backwards in Code ( debugger/VS03.net )

        Tell VS.NET to break when an excepion is thrown. Look on the
        Debug/Exceptions menu.

        Regards,
        Aaron Queenan.

        "c# newbie" <nospam@leave.m e.alone> wrote in message
        news:71d05933f9 599fa93ede76bbd bcd2c0f@news.te ranews.com...[color=blue]
        > When stepping through code, to find where an error is thrown, the problem[/color]
        is[color=blue]
        > that I have to step threw the statement that causes the error, and if it's
        > in a class that's instantiated from the main program, then I may miss the
        > statement that causes the error.
        >
        > How can I get the debugger to stop right at the statement that causes the
        > error.
        >
        >[/color]


        Comment

        Working...