Skip to content

Commit

Permalink
Add readme about debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
vincent-truong-main committed Feb 5, 2024
1 parent 2725d38 commit 9a0ccd4
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,34 @@ Users that are frequent contributors and are involved in discussion (join the sl
### Stay Scoped

Try to keep your PRs limited to one particular issue, and don't make changes that are out of scope for that issue. If you notice something that needs attention but is out of scope, please [create a new issue](https://github.com/rubyforgood/human-essentials/issues/new).
## Debugging
To debug, drop a ``binding.remote_pry`` into the line where you want execution to pause at. Then run ``pry-remote`` in the terminal to connect to it.
https://github.com/Mon-Ouie/pry-remote
```
class Foo
def initialize(x, y)
binding.remote_pry
end
end
Foo.new 10, 20
```

```
$ pry-remote
From: example.rb @ line 7 in Foo#initialize:
2:
3: require 'pry-remote'
4:
5: class Foo
6: def initialize(x, y)
=> 7: binding.remote_pry
8: end
9: end
10:
11: Foo.new 10, 20
```
## Testing 🧪
### Writing Tests/Specs
- Run all the tests with `bundle exec rspec`
Expand Down

0 comments on commit 9a0ccd4

Please sign in to comment.