This repository has been archived by the owner on Jul 31, 2023. It is now read-only.
Make stacktrace handling of missing files more robust #145
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.
Improves the handling when files referenced in the stacktrace aren't available where vscode is running. Addresses two issues that were causing the debugger to throw an exception (and so fail to provide the call stack and current position) when debugging a rails app within a docker container:
/app
directory in the container, so files such as/usr/local/lib/gems/railties-3.0.20/lib/rails/application.rb
weren't being filtered out by the check on line 259, which resulted in an exception when attempting to read the file (as the file only exists within the docker container)This PR changes the logic so that missing files aren't filtered out, because it's still useful to be able to see the stackframe even if you can't see the code. Instead, they are included as "filename:linenum", like this:
actionpack-3.0.20/lib/action_controller/base.rb:150 (Unknown Source:150)
(the gems directory path is stripped off to make it easier to read).Make sure these boxes are checked before submitting your PR -- thanks in advance!