How can I debug or inspect variables and classes in Play framework or simple Java?
In specific:
Which ways are better in application?
eg. in Ruby on Rails I would do one of the following:
raise myvar.to_yaml # halts everything for inspect
Rails.logger.debug myvar # log
puts myvar # log
And which one would be better in groovy templates?
eg. in Ruby on Rails:
<%= debug myvar %>
<%= myvar.inspect %>
Please note I'm new to Play framework and Java develoment.
In eclipse, you have an option "Connect JDPA [applicationname].lanuch" to debug. Right click and enable debug.
you can refer the below document for other IDE. It has detailed explanation for debugging.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.