Wednesday, January 2, 2019

Enable First Chance exceptions in Visual Studio 2017.

Somewhat in following this...

  1. Go to "Customize..." under the "Tools" menu.
  2. Go to the "Commands" tag at the "Customize" dialog box which appears.
  3. Select "Debug" and then pick "Add Command..."
  4. At the "Add Command" dialog, again select "Debug" and pick "Exception Settings"
  5. Click "OK"
  6. There will be a little icon to click on between the "Build" and "Debug" dropdown menus at the top nav now. Click on it to open up the "Exception Settings" pane. It looks like maybe a monitor screen with an exclamation mark in it while a gear sits at the lower left corner of the screen.
  7. Put a check by "Common Language Runtime Exceptions" here.
  8. A coworker suggested testing this stuff by putting a breakpoint in the constructor of a class that was throwing a hard-to-pin-down error message. In theory this catches explosions farther upstream than usual debugging when the debugger first catches an exception but before it decides how to present it. That explains the name, right?

No comments:

Post a Comment