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. Visual Studio
  4. VS Break When Exception Occurs

VS Break When Exception Occurs

Scheduled Pinned Locked Moved Visual Studio
visual-studiohelp
3 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.
  • Z Offline
    Z Offline
    zephaneas
    wrote on last edited by
    #1

    In VS2010, can I somehow 'pause' execute when an exception occurs. My Error Handler is turned off so that in dev mode I can see what's going wrong. When I hit a line that causes an exception, all I get is Continue and Quit. Continue doesn't see to do anything. Clicking it has no visual effect, meaning no code is higlighted and I don't know where in the code the error occured.

    M A 2 Replies Last reply
    0
    • Z zephaneas

      In VS2010, can I somehow 'pause' execute when an exception occurs. My Error Handler is turned off so that in dev mode I can see what's going wrong. When I hit a line that causes an exception, all I get is Continue and Quit. Continue doesn't see to do anything. Clicking it has no visual effect, meaning no code is higlighted and I don't know where in the code the error occured.

      M Offline
      M Offline
      M Edmison
      wrote on last edited by
      #2

      If you are running the program from Visual Studio, then Yes you can. In VS2010 click on the top menu item "Debug" and in that drop down click on "Exceptiosn". Here you will see a list of options to "Break when an exception is:" list, you want to check mark the "Thrown" box next to "Common Language Runtime Exceptions". This makes it to where when that error occurs in the code it will throw the exception through VS instead of through the Windows JIT exception handler. Excellent tool to see where the errors happen as they happen even when you handle them within the application. You can turn that off at anytime as well. *Note, if your running outside of the IDE you can attach to it if the code version in the applicaiton is the same as the application and that is a different subject... Hope that helps.

      1 Reply Last reply
      0
      • Z zephaneas

        In VS2010, can I somehow 'pause' execute when an exception occurs. My Error Handler is turned off so that in dev mode I can see what's going wrong. When I hit a line that causes an exception, all I get is Continue and Quit. Continue doesn't see to do anything. Clicking it has no visual effect, meaning no code is higlighted and I don't know where in the code the error occured.

        A Offline
        A Offline
        Albert Holguin
        wrote on last edited by
        #3

        Make sure you're running in debug mode... if you click on "Continue" and it doesn't do anything, that's usually an indication that you're in release mode and your executable hasn't been build with debug information.

        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