Skip to content

Support println!, dbg!, etc on all platforms #3650

@rick-de-water

Description

@rick-de-water

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions