-
Notifications
You must be signed in to change notification settings - Fork 418
Dashboard Debugger Docs and Some Rearranging #1435
base: main
Are you sure you want to change the base?
Conversation
|
||
## Starting a dashboard | ||
|
||
To start a Truffle Dashboard, you need to run the `truffle dashboard` command in a separate terminal window. | ||
To start a Truffle Dashboard, you need to run the `truffle dashboard` command (or `npx truffle dashboard`) in a separate terminal window. |
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.
I know this isn't something that you added but it feels weird to say "start a Truffle Dashboard"
src/docs/truffle-dashboard/index.md
Outdated
|
||
Today it has 2 main features: | ||
|
||
- Transaction Inspection and Signing: Developers primarily benefit from this by no longer having to manage their own private keys. By using Dashboard as their provider during development, transactions sent from their CLI, tests, and dapp frontend will be intercepted for inspection and signing with MetaMask. Inspection includes the decoded function name, supplied parameters, and more, in addition to the option to debug the transaction. This feature could be completely consumed by MetaMask. |
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.
I think the word after the ":" should be lowercase.
src/docs/truffle-dashboard/index.md
Outdated
Today it has 2 main features: | ||
|
||
- Transaction Inspection and Signing: Developers primarily benefit from this by no longer having to manage their own private keys. By using Dashboard as their provider during development, transactions sent from their CLI, tests, and dapp frontend will be intercepted for inspection and signing with MetaMask. Inspection includes the decoded function name, supplied parameters, and more, in addition to the option to debug the transaction. This feature could be completely consumed by MetaMask. | ||
- Transaction Debugging: Dashboard’s GUI debugger is easier to use than a CLI debugger and is conveniently integrated into the transaction signing workflow. Truffle’s debugger supports older versions of Solidity and better decoding than competing debuggers such as Tenderly’s. Importantly for us, the debugger supplies us with data to extract more readily consumable insights, like revert locations and gas usage information. |
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.
same here
|
||
## Connecting to the dashboard | ||
### Connection | ||
|
||
To make connecting to the Truffle Dashboard easy, Truffle includes a built in network named "dashboard". This built in network automatically uses the port and host specified in the dashboard configuration or falls back to the default `http://localhost:24012`. This built in network can be used with all your deployments or scripts. |
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.
Again, I know you didn't add this but "to the Truffle Dashboard" sounds weird.
<code>eth_signTypedData_v4</code>. We plan to support non-Truffle tooling such as Hardhat in the future. | ||
</p> | ||
|
||
Each time you run `truffle compile`, Truffle shares information about your contracts with Truffle Dashboard. |
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.
There is currently a bug using truffle compile
with Dashboard. Sometimes Truffle closes before the compilations can be saved. It sometimes works, however I think running truffle migrate
in the Truffle development console while Dashboard is open is the way to guarantee they get saved.
|
||
# Truffle Dashboard: Debugger | ||
|
||
Truffle’s debugger is best-in-class thanks to its codec handling vague types, ability to deal with malformed data, and supporter for older Soldiity versions. The primary method of accessing Truffle's debugger up to now has been via the CLI, but now you can enjoy a point-and-click debugging experience with Truffle Dashboard. Some developers prefer a GUI debugger as it’s easier to navigate with context and keeps things like variables and the stack close at hand. |
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.
"and support for older Solidity versions."
|
||
## Debugging from a Signature Confirmation | ||
|
||
When a transaction appears in Truffle Dashboard for signature confirmation, you’ll see a Simulate button to the right of the other options on the card. Clicking this button will launch the debugger for this transaction. |
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.
The button is actually named "Debug"
|
||
## Debugging from a Transaction Hash | ||
|
||
You can paste any arbitrary transaction hash into the debugger rather than using the signature confirmation cards. Paste the desired transaction hash into the input at the upper-right of the debugger screen and click the debug button or press enter to start the debugger session. Note that the Debug button will be disabled until a valid transaction hash is provided. |
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.
Small thing, but maybe it should be "click the Debug button or..."
|
||
There are 4 panels: | ||
|
||
- **Code**: Contains the smart contract code we’re stepping through. Each contract involved in this transaction is displayed in a tab. If we’re unable to get the source code of a contract, we can still debug the transaction, but that particular contract will be opaque and you’ll see an “Unknown Contract” tab noting this. |
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.
Should we call this section "Source Code"? Another small thing but do whatever you want about this
This PR does a number of things:
Once the prose is polished and I've tested it in Firefox and Safari in addition to Chrome, I'll request reviews.