'How can I redirect dbg!() to stdout?

There are some situations where stderr is not available. Is there a way to have dbg!() print to stdout or an alternative command that prints the same information as dbg!() to stdout?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source