> For the complete documentation index, see [llms.txt](https://simian114.gitbook.io/blog/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://simian114.gitbook.io/blog/undefined/rubyonrails/undefined-3/view-helper.md).

# view helper로 디버깅 하는 방법

## 1. debug 메서드

```ruby
<%= debug @book %>
```

## 2. inspect 메서

```ruby
<%= @book.inspect %>
```

위 두 메서드는 `to_s` 와는 다르다. `to_s` 가 `for end_user` 라면 위 두개는 `for developer`

{% hint style="info" %}
[공식 홈페이지](https://rubykr.github.io/rails_guides/debugging_rails_applications.html)에 잘 설명 되어 있다.&#x20;
{% endhint %}
