This repository was archived by the owner on Mar 11, 2024. It is now read-only.
Always use the embedded Debug Adapter #218
Merged
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.
PR description
This PR will use the Debug Adapter embedded within the extension[1], so we can use the
vscodeAPI in the debugger. Essentially it unifies execution modes, i.e., there is no more distinction between bundle and unbundled execution. TheIS_BUNDLE_TIMEconfiguration variable has been removed, and paths were fixed in order for the extension to always find thecheckTruffleConfigTemplatescript. As a result, thesrc/debugger.tsbundle was removed as well, since now the debugger is configured within the extension itself.This difference in execution was causing different behaviors between the unbundled and bundled extension, causing errors when running the bundled extension. This PR should fix this issue.
Moreover, given that the debugger has access to the
vscodeAPI, we can get rid of duplicated code, seeTruffleConfiguration.tsanddebugConfigurationReader.tsinsrc/helpers.Interestingly, the docs[1] suggests to use the embedded DA when it is written in JS/TS, as it is in our case.
Additionally, the
web3ProviderResolverscript was removed since it does not seem to be used anymore.[1] https://code.visualstudio.com/api/extension-guides/debugger-extension#alternative-approach-to-develop-a-debugger-extension
Documentation
doc-change-requiredlabel to this PR if documentation updates are required.