-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Get rid of backspace symbol in artificial stackframe for stacktrace recovery #2291
Comments
It turns out that the coroutine debugger in IDEA would be slightly broken were we to release this change: #2694 (comment). Because of this, we will revert #2461 (via #2695) for the 1.5 release. After the coroutine debugger is modified to accommodate such a change, we will need to wait for long enough to ensure that the supported versions of the Kotlin plugin are not affected by this. Then, we will be able to safely introduce the change. |
Here are the commits: JetBrains/intellij-community@fd29488 They cover all supported IDEA versions, so it's good to go. |
For the sake of IDE-friendliness, we are using backspace symbol
\b
in our stacktrace recovery machinery.This trick is helpful to render a
StackTraceElement
as a raw string without line-numbers and parentheses that are obligatory forStackTraceElement.toString
implementation.While initially it was an acceptable solution, time moves on and debug mode is now frequently used in production environments, even by IntelliJ IDEA and its derivatives.
For that,
\b
solution is no longer desirable: it clutters log files, obfuscates programmatic exception handling and even triggers crashes of third-party tools that do not escape special symbols (that have to be escaped) in exception frames.Solution
The solution is to get rid of
\b
, introduce properly documented artificial function tokotlinx.coroutines
and make intermediate stackframe reference this function instead.While it may be inconvenient for first-time users, it should be okay to once navigate to it in IDEA or to read its documentation to get used to it.
Known issues
Flank/flank#764
https://youtrack.jetbrains.com/issue/RIDER-52026
The text was updated successfully, but these errors were encountered: