You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since there is no way (or at least no documented way) to attach a debugger, I have to rely a lot on simply printing to the console. Sadly, printf! and friends do not appear to be supported on all platforms. When I run my app on the Desktop Windows platform, the output is redirected to the output of the dx cli, as one might expect. On the web platform however, neither the dx cli nor the browser console show the output.
Dioxus does have logging support, but this over-complicates the case of simple print debugging. Personally I wanted to add some print statements to a crate that does not have a dependency on Dioxus or tracing, and adding those dependencies just to print a few lines for debugging purposes is too much overhead.
Implement Suggestion
Ensure that println! and friends output to the browser console, and preferably also to the dx cli when serving.
The text was updated successfully, but these errors were encountered:
rick-de-water
changed the title
Support println!, dbg!, etc on the Web platform
Support println!, dbg!, etc on all platforms
Jan 26, 2025
Feature Request
Since there is no way (or at least no documented way) to attach a debugger, I have to rely a lot on simply printing to the console. Sadly,
printf!
and friends do not appear to be supported on all platforms. When I run my app on the Desktop Windows platform, the output is redirected to the output of the dx cli, as one might expect. On the web platform however, neither the dx cli nor the browser console show the output.Dioxus does have logging support, but this over-complicates the case of simple print debugging. Personally I wanted to add some print statements to a crate that does not have a dependency on Dioxus or tracing, and adding those dependencies just to print a few lines for debugging purposes is too much overhead.
Implement Suggestion
Ensure that
println!
and friends output to the browser console, and preferably also to the dx cli when serving.The text was updated successfully, but these errors were encountered: