add a fallback for providing the source of a file not loaded in the debugger bridge #216
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.
For context: I am running VS Code on windows, and debugging code that is running within Cygwin Perl, which causes some interesting complications.
The original code always assumes it can load the source for the given file, but occasionally it cannot, for reasons i have not yet further inspected. In those cases, the given code simply crashes, which is unfortunate as it usually is in a state where debugging should continue.
The provided patch simply catches this, inserts a message about the missing code, with what exactly is missing, and continues.
This, at the very least, is a useful fix for allowing further work.
For source cause analysis purposes, it seems in my particular case the missing file was:
(eval 138)[c:/cygwin/home/Mithaldu/perl5/lib/perl5/Devel/GlobalDestruction.pm:16]