-
Notifications
You must be signed in to change notification settings - Fork 24
Include disableFetchExternal
flag to avoid debugging with fetching external sources
#255
Conversation
Hey @acuarica , thank you for that :) I have a question about this flag Thank you! @kevinbluer for visibility |
Hi @xhulz, these two flags are opposites. The goal of introducing a negative flag such as Regarding Truffle CLI, the extension's Does this makes sense? |
Hey @acuarica! Makes sense for me. I think it might be better to put this logic inside the URI Handler inside the vscode ext, just to avoid pollute the CLI with extension rules. We'd receive the |
Hey @xhulz, @kevinbluer made realize that something might be a bit unclear. This change relates to how Truffle CLI passes the flag down internally to the shell command to invoke VS Code. It is not about changing Truffle's command line arguments. That is, Given said that, I see two related issues with #255 (comment)
I understand that handling the fetch external sources using a negative flag Hope this makes sense. |
Quick heads up to help reviewing this PR. I used this PR --instead of opening a new one-- to start refactoring the Debugger. More specifically, this is to avoid having modules where only constants/single function are defined. In particular, I've removed the following modules, and move their definitions into the modules where they're being used. I believe this improves our codebase, since we remove one level of indirection when looking up for definitions.
|
Hey @acuarica, Thank you for the explanation. Makes sense |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
PR description
As a follow up of #252, this PR includes a new debugger flag,
disableFetchExternal
, to allow the user avoid fetching external sources when debugging. Note that this flag is used whenever the network is a forked instance, otherwise it is ignored.Currently, this flag can be set from the Debugger's launch configuration or from the Debugger's command line.
This implies that trufflesuite/truffle#5684 is also affected, since this flag needs to be renamed.
From the launch configuration, it can be set as follows
From the Debugger's command line, as implemented in #254 and #231, it can be used as follows,
open "vscode://trufflesuite-csi.truffle-vscode/debug?txHash=0xd4290e9754d1a60cb7be5c1f6b53090fb6f047d13d325517f36aa15b6a9f46e0&workingDirectory=%2FUsers%2Fluigi%2FDownloads%2Ftruffle-sample-project&providerUrl=http%3A%2F%2F127.0.0.1%3A8545&disableFetchExternal=true
Moreover, this PR improves the usage of launch configurations, since it makes the
txHash
,workingDirectory
, andproviderUrl
fields mandatory.Documentation
doc-change-required
label to this PR if documentation updates are required.