-
Notifications
You must be signed in to change notification settings - Fork 697
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* documenting breakpoints * wrong link and add help * Update src/forge/debugger.md --------- Co-authored-by: evalir <[email protected]>
- Loading branch information
Showing
5 changed files
with
37 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
## `breakpoint` | ||
|
||
### Signature | ||
|
||
```solidity | ||
function breakpoint(string) external; | ||
function breakpoint(string, bool) external; | ||
``` | ||
|
||
### Description | ||
|
||
Places a breakpoint to jump to in the debugger view. | ||
|
||
Calling `vm.breakpoint('<char>, true)` is equivalent to `vm.breakpoint('<char>)`, but calling `vm.breakpoint('<char, false)` will erase the breakpoint at `'<char`. | ||
|
||
If the char is overwritten, only the last one that was visited in the execution steps is considered. | ||
|
||
### Examples | ||
|
||
```solidity | ||
function testBreakpoint() public { | ||
vm.breakpoint("a"); | ||
} | ||
``` | ||
|
||
Opening up the debugger in a test environment and pressing `'a` will then place the debugger step at the place where the breakpoint cheatcode was called. | ||
|
||
![breakpoint a](../images/breakpoint.png) | ||
|
||
### SEE ALSO | ||
|
||
[debugger](../forge/debugger.md) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.