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 772773
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T18:51:21+00:00 2026-05-14T18:51:21+00:00

When debugging the following console program: class Program { static void Main(string[] args) {

  • 0

When debugging the following console program:

class Program
{
    static void Main(string[] args)
    {
        Console.WriteLine(DoIt(false));

        Console.WriteLine(DoIt(true));
    }

    private static Boolean DoIt(Boolean abort)
    {
        try {
            throw new InvalidOperationException();
        } catch(Exception ex) {
            if (abort) {
                return true;
            }

            Console.WriteLine("Got here");
            return false;
        }
    }
}

Why does the IDE land on the second return statement during the second call to DoIt()? The results of the execution is correct but the debugging experience is misleading.

Is this a known issue?

Is the behavior in VS 2010 the same?

  • 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-14T18:51:22+00:00Added an answer on May 14, 2026 at 6:51 pm

    It’s a flaw in the 64-bit version of the JIT compiler. It looks like it doesn’t generate entirely correct machine code address-to-statement debug mapping data. It is only somewhat accurate, the “return true” statement does actually jump to the return statement at the end of the method. But it should have hit the closing brace, not the “return false” statement.

    This bug is not present in the x86 version of the JIT compiler. You typically want to use that jitter during debugging, it supports Edit+Continue. Project + Properties, Build tab, Platform Target = x86. That is automatic in VS2010 for new projects.

    You can report the bug at connect.microsoft.com

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

Sidebar

Ask A Question

Stats

  • Questions 535k
  • Answers 535k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer I'd put it somewhere between unlucky and a bug. IIRC… May 17, 2026 at 1:04 am
  • Editorial Team
    Editorial Team added an answer The fundamentals of the application you're interested in developing can… May 17, 2026 at 1:04 am
  • Editorial Team
    Editorial Team added an answer C# can't infer the common base type, so you have… May 17, 2026 at 1:04 am

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

I have the following C code in a program: printf(Test before print_foo()); void print_foo(char
I just finished debugging a problem, where our program crashed on a production server,
During the execution of my program I'm getting the following output in the XCode
When debugging an application I always get the following error when break on exception
The following code causes a SIGSEGV, but only while debugging. #include <stdio.h> #include <stdlib.h>
I have the following use case for debugging a PHP application: The developer does
I have some debugging code that looks like the following: #define STRINGIFY(x) #x #define
I have an [AllowPartiallyTrustedCallers] class library containing subtypes of the System.DataAnnotations.ValidationAttribute. The library is
I've developed a 'custom' cout, so that I can display text to console and
When developing a Win32 Application (non-console application) in Visual Studio 2005, is there any

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.