I understand now, thanks.
I'm afraid in your case the issue is related to a syntax error in the Pipeline so nothing about a runtime error, so there is no way to run any echo as you want.
Though If I recall the Text Area field had a syntax validation, but I cannot find if that's true or something I just wrongly said. I might need to dig a bit deeper, so I'll comment here if I can find something.
In any case, if you use pipeline script from SCM definition then you could benefit of the linting in your local environment: