Visual Basic

Dave W 0 Reputation points
2026-08-13T13:19:11.1433333+00:00

Debug Step INTO and STEP OVER do not work when projects created in VB 2010 are loaded into later versions.

Developer technologies | Visual Studio | Debugging
0 comments No comments

1 answer

Sort by: Most helpful
  1. Marcin Policht 102K Reputation points MVP Volunteer Moderator
    2026-08-13T13:57:14.95+00:00

    This is usually caused by changes in the VB.NET project/debugging environment when a VB 2010 project is opened in a newer version of Visual Studio. The first thing to check is whether Visual Studio is actually loading the current PDB symbols for the assembly being debugged. Without matching PDB files, breakpoints may appear to work inconsistently and Step Into/Step Over can behave as though the debugger is skipping code.

    In Visual Studio, go to Tools > Options > Debugging > General and make sure “Enable Just My Code” is enabled. Also check that “Require source files to exactly match the original version” is not preventing the debugger from using the source. Then rebuild the entire solution using Build > Rebuild Solution rather than simply building the affected project.

    Next, while debugging, open Debug > Windows > Modules. Locate your VB assembly, right-click it, and select “Load Symbols” if symbols are not loaded. The Symbol Status should indicate that the PDB was loaded and matches the module. If it says that no symbols were loaded or that the PDB does not match, Step Into and Step Over will not behave correctly.

    For projects originally created in VS 2010, also check the project properties under Compile > Advanced Compile Options. Make sure the Debug Info setting is not “None”; use “full” or “pdb-only”, depending on the Visual Studio version. Then delete the project's bin and obj directories and perform a full rebuild. This removes stale assemblies and PDB files that can remain after a project is upgraded.

    If Step Into specifically skips a method and goes directly to the caller, check whether the method or its containing class has the DebuggerStepThrough or DebuggerHidden attribute. Those attributes explicitly tell the debugger to skip code. Also check whether the method is being compiled into a different assembly than the source you are looking at; this is particularly common after upgrading older VB.NET solutions.

    Finally, if this occurs only with optimized builds, select the Debug configuration and verify that project optimization is disabled under Project Properties > Compile > Advanced Compile Options. Compile optimization can cause the debugger's execution sequence to differ from the source code, especially with older VB.NET code upgraded to a newer compiler.


    If the above response helps answer your question, remember to "Accept Answer" so that others in the community facing similar issues can easily find the solution. Your contribution is highly appreciated.

    hth

    Marcin

    Was this answer helpful?

    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.