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. Web Development
  3. ASP.NET
  4. Debugging Exceptions.

Debugging Exceptions.

Scheduled Pinned Locked Moved ASP.NET
debuggingquestion
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.
  • S Offline
    S Offline
    swjam
    wrote on last edited by
    #1

    Is there a way in VStudio to set a breakpoint on a line where an exception is expected and tell the debugger that when a particular exception is encountered to "catch" it and proceed with the normal flow of execution? This is particularly useful so that putting a try-catch and then rebuilding would not be necessary while discovering exceptions. Hope not a newbie/ridiculous question.

    ---------------------------------------------------------- Lorem ipsum dolor sit amet.

    A 1 Reply Last reply
    0
    • S swjam

      Is there a way in VStudio to set a breakpoint on a line where an exception is expected and tell the debugger that when a particular exception is encountered to "catch" it and proceed with the normal flow of execution? This is particularly useful so that putting a try-catch and then rebuilding would not be necessary while discovering exceptions. Hope not a newbie/ridiculous question.

      ---------------------------------------------------------- Lorem ipsum dolor sit amet.

      A Offline
      A Offline
      Anurag Gandhi
      wrote on last edited by
      #2

      Hi, Are facing any problem in putting try/catch in your code block? I guess, it is not so difficult. It is anyways suggested to use try/catch unless you are so much sure about your code that it will never throw exception. (No further argument on this, as different people has different school of thoughts) :) If you are developing web application, void Application_Error(object sender, EventArgs e) method in Global.asax file catches your exception (just after exception is thrown) and you can put breakpoint there to analyze what happened wrong. Hope this will help.

      Anurag Gandhi.
      http://www.gandhisoft.com
      Life is a computer program and every one is the programmer of his own life.
      My latest article: Group GridView Data

      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