-
Notifications
You must be signed in to change notification settings - Fork 24
Support network
option in addition to providerUrl
when debugging
#260
Comments
@xhulz @kevinbluer does this make sense after our discussion? @michaeljohnbennett to loop you in. |
Hi @acuarica, Yes, sounds good! Thank you for that one :) |
Hey @acuarica, I think the |
Hi @xhulz, not sure if understand correctly, missing where? |
Hey @acuarica, in the documentation above, but no worries. For example, here: |
Got it, thanks for the heads up. I added some remarks in this issue's Example section that hopefully makes it clear. In summary it is missing because the |
Closing since it was implemented in #261. |
Currently, the extension supports the
providerUrl
option to allow the user to indicate a provider when launching a new debug session. This option suffices unless the user wants to specify a provider using a Web3js object[1]. Since Web3js provider objects do not have a serialized form, the extension needs a mechanism to accept a provider other than using a provider url.Introduce a new debugger option,
network
, that allows the user to specify a network name declared in a Truffle config file, e.g.,truffle-config.js
. Thenetwork
andproviderUrl
are options should be mutually exclusive. When bothnetwork
andproviderUrl
options are present, theproviderUrl
should take precedence.This impacts how Truffle CLI passes arguments down to the extension.trufflesuite/truffle#5684.
Moreover, this new option should be accepted from both the Debugger's launch configuration or from the Debugger's command line (#254 and #231).
Whenever this new feature is implemented, we should update the docs accordingly. This feature should be included in addition to trufflesuite/trufflesuite.com#1354.
Note that the
Truffle: Debug Transaction
command should not be affected by this new option. This command already handles provider selection using VS Code UI.Examples
When the user wants to use a network declared in the Truffle config file, they can set the
network
field (and omit theproviderUrl
field altogether) as followsUsing URI handler
vscode://trufflesuite-csi.truffle-vscode/debug?txHash=0xd4290e9754d1a60cb7be5c1f6b53090fb6f047d13d325517f36aa15b6a9f46e0&network=development&workingDirectory=%2Fpath%2Fto%2Fproject&disableFetchExternal=true
Using a launch configuration
[1] See
provider
property under the networks section for more details.The text was updated successfully, but these errors were encountered: