mirror of
https://github.com/AdaCore/langkit.git
synced 2026-02-12 12:28:12 -08:00
The name of this function was misleading: it had the Debug prefix not because it was "safe for debug" to call it (just like Text, it would crash on a null node), but because it turned the node text into ASCII using escaping for non-ASCII parts of the source, which can be useful for debug or logging. Users should prefer the Image function for debug, which should be familiar to Ada users. Current uses of Debug_Text can just call Text and transform its Text_Type result into a String using Langkit_Support.Text.Image, which is exactly what Debug_Text did. Or they can of course switch to Image, which is much better for debug/logging. TN: T702-025