diff --git a/package.json b/package.json index 9c35d6f..e6161de 100644 --- a/package.json +++ b/package.json @@ -569,8 +569,7 @@ "launch": { "required": [ "txHash", - "workingDirectory", - "providerUrl" + "workingDirectory" ], "properties": { "stopOnEntry": { @@ -603,6 +602,11 @@ "description": "Provider's URL of the Ethereum network to connect to.", "default": "http://127.0.0.1:8545" }, + "network": { + "type": "string", + "description": "Name of the Ethereum network to connect to. The network name should be a key in the `networks` object in your Truffle config file.", + "default": "development" + }, "disableFetchExternal": { "type": "boolean", "description": "When set, do not try to fetch external contract sources when debugging a forked network instance. When the network is not being forked, this flag is ignored.", @@ -627,7 +631,7 @@ "configurationSnippets": [ { "label": "Truffle - Debugger Launch", - "description": "Runs the Truffle debugger (truffle) and attaches to a TestRPC instance", + "description": "Runs the Truffle debugger (truffle) and attaches to a Ganache instance", "body": { "type": "truffle", "request": "launch", @@ -639,6 +643,21 @@ "providerUrl": "http://127.0.0.1:8545", "disableFetchExternal": false } + }, + { + "label": "Truffle - Debugger Launch using config network", + "description": "Runs the Truffle debugger (truffle) and attaches to a Ganache instance", + "body": { + "type": "truffle", + "request": "launch", + "name": "Debug Transaction with Truffle", + "stopOnEntry": false, + "txHash": "0x", + "files": [], + "workingDirectory": "^\"\\${workspaceFolder}\"", + "network": "development", + "disableFetchExternal": false + } } ], "variables": {}