Skip to content

Null Reference Exception while editing Debug Profiles #8435

@Forge36

Description

@Forge36

Visual Studio Version

Microsoft Visual Studio Professional 2022 (64-bit) - Current
Version 17.2.6

Summary

Null Reference exception popup when pressing F2 without a selection in Debug Launch Profiles UI

Steps to Reproduce

  1. Click Run dropdown menu > [Project] Debug Properies
  2. Select a configuration
  3. Rename with F2
  4. Notice after rename nothing is selected
  5. Press F2 again (see error dialog)

Expected Behavior

At step 4 I'd expect the previous profile to be selected.
Baring that: I'd expect step 5 do "do nothing" lacking a current selection.

Actual Behavior

Error dialog is shown:

---------------------------

---------------------------
System.NullReferenceException: Object reference not set to an instance of an object.

   at Microsoft.VisualStudio.ProjectSystem.VS.Implementation.PropertyPages.Designer.LaunchProfilesWindowViewModel.<>c__DisplayClass4_1.<.ctor>b__4(LaunchProfileViewModel profile)

   at Microsoft.VisualStudio.ProjectSystem.VS.Implementation.PropertyPages.Designer.DelegateCommand`1.Execute(Object parameter)
---------------------------
OK   
---------------------------

User Impact

Momentary confusion.

Metadata

Metadata

Assignees

Type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions