Execution Continues After Exception Occurs In Evaluator
已回答
While debugging a script, if I evaluate an expression in the Evaluator window, and the expression throws an exception, then script execution continues. I would expect the script to remain at the debug point. Is there a setting I can toggle somewhere to fix this?
An example exception: my_variable is NOT defined. If I execute puts my_variable in the evaluator, the expression fails as expected; but then script execution continues, which is not expected.
This issue began to show up after I upgraded from jruby 9.3.4.0 to jruby 9.4.0.0.
I am using RubyMine 2022.3.1.
请先登录再写评论。
Hello,
I tried to reproduce it in RubyMine 2022.3.1 with the same jruby-9.4.0.0, but didn't manage to. Here's the sample code I used
So I stopped on the breakpoint and tried to evaluate `my_variable`, but the debugger didn't resume, just showed that the variable is undefined.
My debug gems were ruby-debug-ide 0.7.3 + ruby-debug-base 0.10.7. Please let me know if your steps were the same.
Thanks for your reply.
I have one difference in my code, using the example you provided. I try to print my_variable to console, and run that line in the evaluator:
I also noticed that 'continue after exception' was not printed out, but instead the exception and stacktrace were output, and execution stopped as in a failure. Here is the output:
I tried the same, but in the evaluation console I placed `my_variable` only. Would it be possible to record a screencast showing your steps?
Oh I see, in the evaluation console, you have to put `p my_variable`. Let me know if that changes anything. If not, I will look into recording a screencast.
Yes, the result is the same, but it stops if I expand the node with the result. Is it what you're doing?
Here are some screenshots of before and after I click "Evaluate". I am on Windows.
Before:
After:
Thank you for the screenshots, I managed to reproduce so here's the issue on our tracker:
https://youtrack.jetbrains.com/issue/RUBY-30847/JRuby-debug-execution-continues-after-exception-occured-in-evaluation
Please add your vote (https://intellij-support.jetbrains.com/hc/en-us/articles/207241135-How-to-follow-YouTrack-issues-and-receive-notifications) there.
Voted, thank you!
Olga Kuvardina Looks like upgrading to jruby 9.4.1.0 fixes the issue