Fix crashing issue because of exception when attaching tests #63
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Like described in #59, the debug adapter crashes when attaching tests. This is because of a
AbsentInformationException
when trying to get positions of a breakpoint (due to theLocation
object not being able to resolvesourcePath
andsourceName
, and yes, I verified that it had issues with both). For now I have just made the method return null when we get that exception. I found no ways of finding the source file as of now, but I will continue looking for ways to do it. I still think making the debugger not crash is a good way forward for now.Why merge this? While we won't get position information for breakpoints, we still get variable information for the breakpoint. This means the editor (tested with Emacs dap-mode) won't automatically jump to the source with the breakpoint, but will still show debug information like the variables for that breakpoint. You can also step in the code (without seeing where you are). While this is not perfect, it actually improves debugging tests by a tiny bit (making it possible to some minimal degree without crashing) 馃檪 (there are no information on debugging tests as of now, and to my knowledge the attachment way is the only way for now)