# Objective When using tracing or [`bevy_mod_debugdump`](https://github.com/jakobhellermann/bevy_mod_debugdump), the names of function systems produced by closures are either ambiguous (like `game::mainapp::{closure}` when tracing) or too long (`bevy_mod_debugdump` includes full type signature if no name given), which makes debugging with tracing difficult. ## Solution Add a function `with_name` to rename a system. The proposed API can be used in the following way: ```rust app .add_systems(Startup, IntoSystem::into_system(|name: SystemName| { println!("System name: {}", name.name().to_owned()); }).with_name("print_test_system")); ``` ## Testing - There is a test in `bevy_ecs::system:system_name::test_closure_system_name_regular_param` |
||
|---|---|---|
| .. | ||
| commands | ||
| adapter_system.rs | ||
| builder.rs | ||
| combinator.rs | ||
| exclusive_function_system.rs | ||
| exclusive_system_param.rs | ||
| function_system.rs | ||
| mod.rs | ||
| observer_system.rs | ||
| query.rs | ||
| system_name.rs | ||
| system_param.rs | ||
| system_registry.rs | ||
| system.rs | ||