Share via

How to stop the debugger from showing decompiled code in VB.NET

Seybert, Thomas A 20 Reputation points
2026-02-23T10:03:06.8966667+00:00

Hi,

I have been working on a project now for some time in VB.NET. I have debugged it many times without any issues. I must have changed something in the code or properties of the project that has caused Visual Studio to show decompiled code in C#. I would like the debugger to take me to the place in the VB code where the error has occurred and not to a place in decompiled code. I am at a complete loss here on how to do that. Any help is greatly appreciated. I am using VS 2026.

Developer technologies | VB

Answer accepted by question author
  1. Surya Amrutha Vaishnavi Lanka (INFOSYS LIMITED) 1,960 Reputation points Microsoft External Staff
    2026-02-24T12:03:45.5633333+00:00

    Thanks for reaching out

    The issue with debugger is most commonly happens due to non-breakpoint debug stop conditions, such as exception settings, tracepoints, conditional breakpoints, or debugger stepping behavior. Below are the clean steps you can give.

    1. Run again and when it stops, look at the Debug Location / Exception Helper.
    2. If it shows an exception type/message, it’s stopping because the debugger is configured to break on that exception.
    3. Open Exception Settings and disable “break on thrown” for that exception type, or limit to “user‑unhandled”.
    4. Open the Breakpoints window and remove/disable anything that might be set as: Tracepoint Conditional breakpoint Functional breakpoint
    5. delete all breakpoints, then add back only one simple breakpoint you control.
    6. Clean + Rebuild the solution and start debugging
    7. When it stops, open Call Stack and identify whether the top frame is your project or external.
    8. Open Modules and confirm your module symbols are loaded and marked as “My Code”.

2 additional answers

Sort by: Most helpful
  1. Seybert, Thomas A 20 Reputation points
    2026-02-23T12:14:32.1033333+00:00

    This answer solved my problems with the display of decompiled C# code in VB.NET. However, I am still having issues with the debugger. For some reason, my debugger stops at a specific line of code while debugging. I simply hit continue debugging and code executes successfully. It is like I have a break point set at that line of code, but I do not. I am not sure why this is happening.

    0 comments No comments

  2. Q&A Assist
    2026-02-23T10:03:16.7833333+00:00
    AI generated content. This question contains an answer created with AI from Q&A Assist. Learn more

    To stop the debugger from showing decompiled code in VB.NET and ensure it takes you to the original VB code where the error has occurred, you can disable the Just My Code feature. Here’s how to do it:

    1. Open Visual Studio.
    2. Go to the menu and select Tools > Options.
    3. In the Options dialog, expand the Debugging section and then select General.
    4. Look for the option labeled Enable Just My Code and uncheck it.
    5. Click OK to apply the changes.

    Disabling this feature allows the debugger to step into the original source code instead of showing decompiled code. Additionally, ensure that your project settings are configured correctly to include debugging information and that the code is not optimized, as optimized code can lead to similar issues.


    References:

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.