Skip to content

Unintuitve stepping behavior for match expressions in a debugger #87817

@wesleywiser

Description

@wesleywiser

Given some code like:

fn main() { foo(Some(42)); } fn foo(bar: Option<u32>) -> u8 { match bar { Some(42) => 1, Some(_) => 2, None => 3, } }

Stepping into foo, I would expect the sequence of executed lines to look like 6 -> 7 -> 11 but it currently is 7 -> 6 -> 11 which doesn't make much sense.

This behavior appears in all debuggers with any of stable (1.54), beta (1.55) or nightly (1.56) compilers.

Ubuntu.2021-08-06.10-33-55.mp4

Metadata

Metadata

Assignees

Labels

A-debuginfoArea: Debugging information in compiled programs (DWARF, PDB, etc.)C-bugCategory: This is a bug.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions