In WPF project, why a breakpoint can't stop the program? see the picture

兰树豪 381 Reputation points
2023-03-01T07:21:09.5033333+00:00

User's image

Pls see the picture, this is a WPF project, set a breakpoint on app.run() inside Main ,but no use

Developer technologies Windows Presentation Foundation
Developer technologies .NET Other
Developer technologies Visual Studio Other
Developer technologies C#
{count} votes

Accepted answer
  1. Hui Liu-MSFT 48,676 Reputation points Microsoft External Staff
    2023-03-01T08:53:24.09+00:00

    Hi,@兰树豪 . Welcome Microsoft Q&A.

    The .g.i.<lang-specific extension.> are used internally to provide various Visual Studio features including intellisense.  The files don't appear in the obj directory because they are generated in memory.

    The g.i.cs-Files are only visible in the Solution Explorer, select "Show all Files" and browse to the obj\Debug-Folder.

    You cannot debug *.g.i.cs file. (Of course, unless you have reflector plug-in integrated in your Visual Studio)

    When App.xaml is built, MSBuild generates the actual code that represents what was declared in App.xaml, storing the code in App.g.i.cs.

    User's image


    If the response is helpful, please click "Accept Answer" and upvote it.

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

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.