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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. Visual Basic
  4. Equivalent of "Break on All Errors" in VB.NET

Equivalent of "Break on All Errors" in VB.NET

Scheduled Pinned Locked Moved Visual Basic
helpcsharpquestion
4 Posts 4 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.
  • P Offline
    P Offline
    pra net
    wrote on last edited by
    #1

    Hi, I switched over from VB6 to VB.NET. In VB6 when we wanted to temprorily disable error handling, we used "Break on all Errors". How do we disable error handling in VB.NET? I've Got stuck in a procedure that has a lot of code between the try...catch block and many nested try.. catch blocks too. I want to know which part of the code is generating errors. Please help. Thanks,

    D D T 3 Replies Last reply
    0
    • P pra net

      Hi, I switched over from VB6 to VB.NET. In VB6 when we wanted to temprorily disable error handling, we used "Break on all Errors". How do we disable error handling in VB.NET? I've Got stuck in a procedure that has a lot of code between the try...catch block and many nested try.. catch blocks too. I want to know which part of the code is generating errors. Please help. Thanks,

      D Offline
      D Offline
      Dave Sexton
      wrote on last edited by
      #2

      Do the errors not throw exceptions? If they do have you tried checking the stack trace for the error? That should at least point you in the right direction.

      1 Reply Last reply
      0
      • P pra net

        Hi, I switched over from VB6 to VB.NET. In VB6 when we wanted to temprorily disable error handling, we used "Break on all Errors". How do we disable error handling in VB.NET? I've Got stuck in a procedure that has a lot of code between the try...catch block and many nested try.. catch blocks too. I want to know which part of the code is generating errors. Please help. Thanks,

        D Offline
        D Offline
        Dave Kreskowiak
        wrote on last edited by
        #3

        There is no equivilent in VB.NET. Set breakpoints in your catch statements and look at the stack trace, or set them at the beginning of your Try blocks and step through the code line by line, or comment out the Try/Catch statements, or instrument your code and log critical information you need to trace back the errors.

        Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
             2006, 2007

        1 Reply Last reply
        0
        • P pra net

          Hi, I switched over from VB6 to VB.NET. In VB6 when we wanted to temprorily disable error handling, we used "Break on all Errors". How do we disable error handling in VB.NET? I've Got stuck in a procedure that has a lot of code between the try...catch block and many nested try.. catch blocks too. I want to know which part of the code is generating errors. Please help. Thanks,

          T Offline
          T Offline
          TwoFaced
          wrote on last edited by
          #4

          You said you want to know what part of the code is generating errors. It sounds to me like you actually want the errors to happen as though there is no try...catch block. You can accomplish this by going to Debug > Exceptions and then checking the checkbox for 'common language runtime exceptions' under the 'thrown' column. This should cause the program to break when an error occurs even if it's in the try...catch block.

          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