Skip to content

[Bug]: Breakpoint in MainWindow's constructor doesn't work #342

Open

Description

Describe the bug

It appears the debugger is potentially attaching too late, and I'm not able to set breakpoints in app.xaml's constructor and launched events as well as MainWindow's constructor.

To Reproduce

Repro steps:

  • Create a new navview template: dotnet new winui-navview
  • Launch vscode: code .
  • Accept vs code's winapp dialog to add launch dialog
  • Set breaking point MainWindow.xaml.cs's constructor, anywhere in App.xaml.cs's code and in NavView_SelectionChanged
  • F5 to launch and run. Notice no breakpoints in the constructor or app.xaml is ever hit. When selecting a different navigation item, that breakpoint is hit.

Expected behavior

All breakpoints are hit

Screenshots

Image

OS Version and details

Windows 26H2. VS Code extension v0.4.0

Activity

  1. added
    bug
    on Nov 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions