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 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

Related Questions

I've got the following simple code: class Program { static void Main(string[] args) {
Consider this simple console application: using System; namespace Demo { class Program { static
I have the following C code in a program: printf(Test before print_foo()); void print_foo(char
Try debugging the following simple program, and mouse over x in each step (or
After hours I am giving up on debugging the following: This works: URL[] urls
Im trying to get debugging working without an app.config. I have the following code:
This was a fascinating debugging experience. Can you spot the difference between the following
I need help debugging some odd file behavior in Python. Take the following script
I'm remote debugging a tomcat at another server. Tomcat is started with the following
Debugging a PHP program, is there any add-on/plug-in for browser which I can view

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.