Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: remove forge debug as standalone command, access through --debug on forge script and forge test instead #1382

Merged
merged 1 commit into from
Jan 6, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions src/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,6 @@
- [`forge config`](./reference/cli/forge/config.md)
- [`forge coverage`](./reference/cli/forge/coverage.md)
- [`forge create`](./reference/cli/forge/create.md)
- [`forge debug`](./reference/cli/forge/debug.md)
- [`forge doc`](./reference/cli/forge/doc.md)
- [`forge eip712`](./reference/cli/forge/eip712.md)
- [`forge flatten`](./reference/cli/forge/flatten.md)
Expand Down Expand Up @@ -286,7 +285,6 @@
- [forge verify-check](./reference/forge/forge-verify-check.md)
- [forge flatten](./reference/forge/forge-flatten.md)
- [Utility Commands](./reference/forge/utility-commands.md)
- [forge debug](./reference/forge/forge-debug.md)
- [forge bind](./reference/forge/forge-bind.md)
- [forge cache](./reference/forge/forge-cache.md)
- [forge cache clean](./reference/forge/forge-cache-clean.md)
Expand Down
18 changes: 1 addition & 17 deletions src/forge/debugger.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Forge ships with an interactive debugger.

The debugger is accessible on [`forge debug`](../reference/forge/forge-debug.md) and on [`forge test`](../reference/forge/forge-test.md).
The debugger is accessible on [`forge test`](../reference/forge/forge-test.md) and on [`forge script`](../reference/forge/forge-script.md)

Using `forge test`:

Expand All @@ -20,22 +20,6 @@ If you have multiple contracts with the same function name, you need to limit th

If the matching test is a fuzz test, the debugger will open the first failing fuzz scenario, or the last successful one, whichever comes first.

Using `forge debug`:

```sh
$ forge debug --debug $FILE --sig $FUNC
```

Where `$FILE` is the path to the contract you want to debug, and `$FUNC` is the signature of the function you want to debug. For example:

```sh
$ forge debug --debug src/SomeContract.sol --sig "myFunc(uint256,string)" 123 "hello"
```

You can also specify raw calldata using `--sig` instead of a function signature.

If your source file contains more than one contract, specify the contract you want to debug using the `--target-contract` flag.

### Debugger layout

![An image of the debugger UI](../images/debugger.png)
Expand Down
2 changes: 0 additions & 2 deletions src/reference/cli/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
- [`forge config`](./forge/config.md)
- [`forge coverage`](./forge/coverage.md)
- [`forge create`](./forge/create.md)
- [`forge debug`](./forge/debug.md)
- [`forge doc`](./forge/doc.md)
- [`forge eip712`](./forge/eip712.md)
- [`forge flatten`](./forge/flatten.md)
Expand Down Expand Up @@ -172,4 +171,3 @@
- [`chisel view`](./chisel/view.md)
- [`chisel clear-cache`](./chisel/clear-cache.md)
- [`chisel eval`](./chisel/eval.md)

Loading
Loading