Why does Vs 2022 code step open a .cs file and how do I stop this?

HowardMontemurro-7208 45 Reputation points
2023-09-24T19:36:51.3+00:00

Something happened to my VS2022 (community) software {default options ?} to cause the following:

I set a breakpoint and start debugging - the operation stops at the breakpoint

I click on the step into icon and then a .cs file opens in the edito . Examples:

        Code    stepped into                                         opens .cs file

If StrTemp.Contains("Factory\bin\Debug") Then string.cs (see image)

StrTemp = Path.GetDirectoryName(StrTemp) path.cs

If Not Directory.Exists(StrPath) Then directory.cs

This is not limited to one solution or project so I assume that I have unknowingly corrupted some value in a parts of the debug functions in TOOLS > OPTIONS.

I would be grateful for any help with this problem. Thank you.

Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
5,041 questions
{count} votes

Accepted answer
  1. David Lowndes 2,535 Reputation points MVP
    2023-09-24T20:05:21.6566667+00:00

    Check the Tools, Options, Debugging, General, "Enable Just My Code" setting.

    1 person found this answer helpful.
    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. HowardMontemurro-7208 45 Reputation points
    2023-09-24T19:41:31.1633333+00:00

    Step_Into

    0 comments No comments

Your answer

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