-
Notifications
You must be signed in to change notification settings - Fork 5
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
Filter exceptions when using caught or uncaught exceptions debug filters #161
Comments
Thanks for reporting, I can't seem to reproduce it currently. Might be a Windows specific issue or maybe JDK one? What Java version are you using? |
|
Thanks! @alekseiAlefirov managed to confirm the issue, this seems to be happening on JDK 8 and looks fine on JDK 11 |
I finally managed to investigate this a bit and it seems that because we are currently using https://github.com/microsoft/java-debug it breaks on each thrown exception and the current the behavior is expected. There is unfotunately no way to specify an exact filter using DAP. We would most likely need to solve the issue in Metals, my guess is that we would need to:
I am not sure if that is a perfect solution, I think it would be much better if it was solved on the client side. Java extension did something similar here: microsoft/vscode-java-debug#829 As this is a bit more involved than initially though I will move it out to feature requests. |
This issue becomes one major source of frustration when working with heavy weight frameworks such as flink, kafka. While these frameworks handle exceptions we still have to sift through them to get to our own code. Only recourse is to liberally add breakpoints and hope to catch them soon. I'm not sure if VSCode's logpoints work as then I would simply add those liberally and examine all outputs in one go |
Filtering debug steps is something I have investigated in scalacenter/scala-debug-adapter#122. I think we can solve it in the debug server by adding a notion of |
The debugger seems to work fine if I uncheck "Caught Exceptions" in the "Breakpoints" pane. However, if I enable it then the debugger breaks in URLClassLoader java class method findClass line 382:
To Reproduce
Steps to reproduce the behavior:
Expected behavior
I would expect that the ClassNotFoundException exception is not thrown.
Screenshots
Without "Caught Exceptions" enabled:
![debug1](https://user-images.githubusercontent.com/1951111/80385268-27afc200-88a6-11ea-99d3-8e180b3378c2.PNG)
With "Caught Exceptions" enabled:
![debug2](https://user-images.githubusercontent.com/1951111/80385292-2da5a300-88a6-11ea-85fd-d23522ba8765.PNG)
Installation:
Search terms
Debugger
The text was updated successfully, but these errors were encountered: