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

  • SEARCH
  • Home
  • 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 372215
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T14:11:21+00:00 2026-05-12T14:11:21+00:00

Look at the following program. The comments show the order of execution when I

  • 0

Look at the following program.

The comments show the order of execution when I use Visual Studio 2008, and start, and step through the program only hitting the F11 (Step Into) debugging hotkey. The first column is what I actually experience now, the second column is what I expected to happen.

Note that the method in the class marked with the DebuggerNonUserCode attribute is stepped into, whereas the one with DebuggerStepThrough isn’t. I expected the debugger to step over both of these. This did not happen before. I’ve tagged a lot of my classes with this attribute, since I don’t want to wade through all that noise when debugging new features in my class library, but now the debugger walks right into them as though the attribute isn’t there.

Anyone experienced this? Have I messed up an option somewhere in Visual Studio?

using System;
using System.Diagnostics;

namespace ConsoleApplication3
{
    class Program
    {
        static void Main(string[] args)
        {                                   // 1             // 1
            new C1().Test();                // 2, 5          // 2
            new C2().Test();                // 6             // 3
        }                                   // 7             // 4
    }

    [DebuggerNonUserCode]
    public class C1
    {
        [DebuggerNonUserCode]
        public void Test()
        {                                   // 3
        }                                   // 4
    }

    [DebuggerStepThrough]
    public class C2
    {
        [DebuggerStepThrough]
        public void Test()
        {
        }
    }
}
  • 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-05-12T14:11:21+00:00Added an answer on May 12, 2026 at 2:11 pm

    The attribute DebuggerNonUserCode will not break on the method call when there is an exception. The code will break on the next catch in the stack.1

    DebuggerNonUserCode

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

Sidebar

Related Questions

please look through the following program.. #include <stdio.h> #include <malloc.h> #include <iostream> #include <string.h>
Please look at the following program, the error is invalid effective address calculation and
The following simple Java program appears to display the string Hello World through the
Take a look at the following program: class Test { List<int> myList = new
Question: I look for a program that can do the job for the following
I write the following program in NASM in order to practice offset, addressing, tables,
When I execute the following program and look at the performance counter the results
In simplicity, PL/SQL generally follow the following: DECLARE Variable declaration BEGIN Program Execution EXCEPTION
I use the following program to write to a fifo: #include <iostream> #include <fstream>
Look at the following picture, which is showing a smart tag for DataGridView. DataGridView

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.