Debug erb file in ruby ?

I am not using sinatra erb or rails erb framework, however I will like to debug erb ( internally there is ruby code) .

Is it possible to debug into erb file using the debugger when I using following call ?


I try to breakpoint the ruby code in hello.erb but rubymine does not step into it , however it run the ruby code inside the erb file.
Do i need to do special setup to debug the erb file or is debugging into erb file currently not supported ?
Comment actions Permalink

In order to debug erb file, you need to provide proper file name for that template. You can do it like this:

erb =
erb.filename = filename
Comment actions Permalink

Good tip.  Where would I put that code, however?  Thanks... 

Comment actions Permalink

You need to find where ERB instance is created and replace it with sample above.

Rails ERB templates should be fine without any additional work


Please sign in to leave a comment.