Skip to content

Conversation

@joemmett
Copy link
Member

This improves the visualization of std::coroutine_handle. These are
implemented by native visualization code and will require an updated
Visual Studio to work. All take the frame pointer _Ptr as an argument.

  • primary_function returns the address of the user coroutine function.
    This is used in the display name of the coroutine_handle to indicate
    with which coroutine it is associated instead of the compiler-generated
    resume function.
  • suspend_point returns the suspend point index at which the coroutine
    is currently suspended. The natvis rules will display friendly names
    for the special suspend points for initial (1) and final (0, -1) suspend.
  • suspend_point_line returns the line number of the current suspend
    point. This requires additional debugging info in the .PDB which is
    not present in the initial compiler releases with standard coroutine
    support. The natvis rules will omit the line number if it's not available.

This improves the visualization of `std::coroutine_handle`. These are
implemented by native visualization code and will require an updated
Visual Studio to work. All take the frame pointer `_Ptr` as an argument.

 * `primary_function` returns the address of the user coroutine function.
 This is used in the display name of the coroutine_handle to indicate
 with which coroutine it is associated instead of the compiler-generated
 resume function.
 * `suspend_point` returns the suspend point index at which the coroutine
 is currently suspended. The natvis rules will display friendly names
 for the special suspend points for initial (1) and final (0, -1) suspend.
 * `suspend_point_line` returns the line number of the current suspend
 point. This requires additional debugging info in the .PDB which is
 not present in the initial compiler releases with standard coroutine
 support. The natvis rules will omit the line number if it's not available.
@joemmett joemmett requested a review from a team as a code owner March 26, 2021 14:28
@AnjuDel AnjuDel added the visualizer How the VS debugger displays STL types label Mar 26, 2021
@StephanTLavavej StephanTLavavej merged commit 6213792 into microsoft:main Mar 30, 2021
@StephanTLavavej
Copy link
Member

Thanks for improving this visualizer and making coroutines significantly more usable! 🎉 😸 👁️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

visualizer How the VS debugger displays STL types

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants