Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7817213
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T06:09:36+00:00 2026-06-02T06:09:36+00:00

using System; using System.Diagnostics; using NUnit.Framework; namespace TestExperiment { [TestFixture] internal class TestAAA {

  • 0
 using System;
 using System.Diagnostics;
 using NUnit.Framework;

 namespace TestExperiment
 {
     [TestFixture]
     internal class TestAAA
     {
         [Test]
         public void Test_ThrowSwallowThirdParty()
         {
             ThrowSwallowThirdParty();
         }

         [Test]
         public void Test_ThrowSwallowLocal()
         {
             ThrowSwallowLocal();
         }

         [DebuggerStepThrough]
         [DebuggerNonUserCode]
         [DebuggerHidden]
         public void ThrowSwallowThirdParty()
         {
             ThirdPartyLibrary.ThrowEmbedded();
         }

         [DebuggerStepThrough]
         [DebuggerNonUserCode]
         [DebuggerHidden]
         public void ThrowSwallowLocal()
         {
             try
             {
                 throw new Exception();
             }
             catch (Exception e)
             {
             }
         }
     }

     // imagine this is a 3rd party library provided in a dll which I am referencing
     internal static class ThirdPartyLibrary
     {
         public static void ThrowEmbedded()
         {
             try
             {
                 throw new Exception();
             }
             catch (Exception e)
             {
             }
         }
     }
 }

As per here and here I understand you can use the [DebuggerHidden] attribute to prevent the debugger from stopping at a swallowed exception even if it is told to break on all thrown exceptions. This works for Test_ThrowSwallowLocal(). However I would like to duplicate this when calling code in a 3rd party library which is throwing and swallowing its own exceptions – which I am trying to emulate in Test_ThrowSwalloThirdParty() – at the moment the debugger continues to break at the exception throw.

Is there a way to avoid this without editing the ThirdPartyLibrary code (which I cannot easily do?)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T06:09:37+00:00Added an answer on June 2, 2026 at 6:09 am

    I would look into the Just My Code Option in VS

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

using System; namespace random { interface IHelper { void HelpMeNow(); } public class Base
using System; using System.Math; class test { public static void Main() { Console.Write(Enter any
Consider the following C# program: using System; using System.Diagnostics; namespace Test { class MainClass
The program’s code is like below: using System.Diagnostics; class Test { static void Main()
I have this program here: namespace TodoPlus { using System.Diagnostics; public class LameProg {
I have the following code: using System; using System.Diagnostics; using System.IO; using PdfSharp.Pdf.Printing; namespace
i am tying to login using System.Diagnostics.Process.Start private void button1_Click(object sender, EventArgs e) {
When using using System.Diagnostics; and Debug.WriteLine(Test); having run the application, no Test can be
I have this following simple service program: using System.Diagnostics; using System.ServiceProcess; namespace BasicService {
I'm creating new processes using System.Diagnostics.Process class from my application. I want this processes

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.