Skip to content

Commit

Permalink
chore: remove forge debug as standalone command, access through `--de…
Browse files Browse the repository at this point in the history
…bug` on `forge script` and `forge test` instead (#1379)

remove forge debug as standalone command, access through --debug on `forge script` and `forge test` instead
  • Loading branch information
zerosnacks authored Jan 6, 2025
1 parent 96e0f19 commit 0ef1fbb
Show file tree
Hide file tree
Showing 7 changed files with 5 additions and 474 deletions.
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

0 comments on commit 0ef1fbb

Please sign in to comment.