Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow stepping through object init blocks #63383

Closed
TahirAhmadov opened this issue Aug 13, 2022 · 2 comments
Closed

Allow stepping through object init blocks #63383

TahirAhmadov opened this issue Aug 13, 2022 · 2 comments
Labels
Area-IDE Feature Request Resolution-Duplicate The described behavior is tracked in another issue

Comments

@TahirAhmadov
Copy link

TahirAhmadov commented Aug 13, 2022

Summary

Treat object init blocks as a series of separate steps for debugging purposes

Background and Motivation

Given the powerful syntax for collections,etc., sometimes I end up compacting a lot of code into the init block, and currently it's only "one step" - no way to set a breakpoint in the middle, see where exactly an exception is raised from, etc.

Proposed Feature

var x = new Foo
{
  Prop = "abc",
  List = {
    new Bar
    {
      OtherProp = 123,
    }
  },
};

These new "steps" should be recognized (after x = new Foo):

  • Set Prop (the Foo instance should be visible in Locals and/or Auto watch windows)
  • new Bar
  • Set OtherProp (the Foo and Bar instances should be visible in Locals and/or Auto watch windows)
  • Add Bar to List (the Foo and Bar instances should be visible in Locals and/or Auto watch windows)

Alternative Designs

N/A

@dotnet-issue-labeler dotnet-issue-labeler bot added the untriaged Issues and PRs which have not yet been triaged by a lead label Aug 13, 2022
@dibarbet
Copy link
Member

@tmat would this be a feature request on the debugger or us?

@dibarbet
Copy link
Member

duplicate of #27184

@dibarbet dibarbet added Resolution-Duplicate The described behavior is tracked in another issue and removed untriaged Issues and PRs which have not yet been triaged by a lead labels Aug 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-IDE Feature Request Resolution-Duplicate The described behavior is tracked in another issue
Projects
None yet
Development

No branches or pull requests

2 participants