Closed yu-sutong closed 1 month ago
@yu-sutong Is this version of the code in your fork's master branch (so that others can try to replicate problem)?
Yes Prof.
Hi, I'm a senior from a previous batch
This is the intended behaviour of the IntelliJ debugger, once it encounters any new Exceptions, it will automatically switch to the Exception view to help you debug it, regardless of whether or not the Exception has been handled. Your program did not crash and you should be able to continue using it in the main Terminal window, circled in this edited screenshot
Hi, I'm a senior from a previous batch, just dropping by the forum to see if I can help. As @TohLiYuan mentioned, this is due to the nature of IntelliJ, and you have 3 main workarounds to this problem:
Hope this helps!
@yu-sutong If the above replies don't help you solve the problem, you may wish to post a screen recording of your Intellij session, so that we can see exactly how you ended up in the view shown in the screenshot.
@TohLiYuan @neyapraveen Thank you for the help and it has solved my issues!
I tried option 2 too, which is unchecking "Caught Exceptions", but that didn't stop IntelliJ from breaking at handled exceptions. I will move on with option 1 and always switch back to the main terminal.
@yu-sutong A gentle reminder to close this issue if the problem has been resolved. If not resolved yet, please post a comment explaining which part of the problem/question remains unresolved.
@yu-sutong I'm closing this issue due to inactivity. Feel free to reopen if the issue is still unresolved.
I believe I handled my exception correctly, and when I run my code on VSCode, typing an invalid command will not crash my program. However on IntelliJ, it crashes the program. May I know how to resolve this issue on IntelliJ? Thank you very much!