Avatar ·

Step-by-step debugger for Rust: how to debug code in 2024?

Hi everyone! I've been writing in Rust for several months, but I still can't get used to debugging. In Python, I just used `import pdb; pdb.set_trace()` and could step through the code easily. In Rust, I feel like a blind kitten.\n\nHere's a specific problem. I have a function that processes orders:\n\n```rust\nfn process_orders(orders: Vec) -> Vec {\n orders\n .into_iter()\n .filter(|o| o.status == OrderStatus::Pending)\n .map(|o| {\n let discount = calculate_discount(&o);\n let total = o.amount - discount;\n ProcessedOrder {\n id: o.id,\n final_price: total,\n items_count: o.items.len(),\n }\n })\n .collect()\n}\n```\n\nI suspect that `calculate_