-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Switch types to use RuntimeDebug
instead of gated Debug
#4652
Conversation
This is useful for when you want to debug in wasm and enable the `force-debug` feature of `sp-debug-derive`.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should have a small, but non-zero impact on the code size if I am not mistaking. The RuntimeDebug
will generate a impl
block for this type in wasm that's not really printing anything, whereas the std-gated Debug
is literally non-existent in wasm. Can you confirm which one is the case here? Maybe the RuntimeDebug
's implementation is also stripped away by the compiler?
Either way, PR is fine to me.
This is correct. |
Can we please land this quickly, as I need it for debugging my code? Merci. I merged this branch into mine. It builds now but I still get a I want to debug a |
Benchmarks are only running in wasm.
If it is just |
So how can I debug my event then without being stripped away? |
This is using this code: https://github.com/paritytech/substrate/blob/master/frame/support/procedural/src/lib.rs#L448-L476 |
…ch#4652) * Switch types to use `RuntimeDebug` instead of gated `Debug` This is useful for when you want to debug in wasm and enable the `force-debug` feature of `sp-debug-derive`. * Fixes * 🤦
This is useful for when you want to debug in wasm and enable the
force-debug
feature ofsp-debug-derive
.Fixes: #4651