fix(toDebugString): change replacement string

As discussed in #10085, the original replacement string can be treated as html when displayed by the browser so it replaces it with '...' string.

This PR has filtered that one fix from #10099 commit