Grails - 在开发模式下显示页面处理/呈现调试信息

时间:2010-06-14 09:48:09

标签: grails debugging rendering

过去两天我一直在尝试使用Grails,到目前为止,我对它非常满意。

来自Rails,我在这里唯一缺少的是在页面提供后显示的开发模式调试信息。

这就是我的意思:

Processing UsersController#show (for 127.0.0.1 at 2010-06-14 10:28:44) [GET]
  Parameters: {"id"=>"2"}
  User Load (0.0ms)   SELECT * FROM "users" WHERE ("users"."id" = 2) 
Rendering template within layouts/users
Rendering users/show
Completed in 24ms (View: 5, DB: 0) | 200 OK [http://localhost/users/2]

有没有办法在Grails中获得类似的东西?我已经尝试了“调试”插件,但它不是很有用,因为它只显示总处理时间。

我知道推出我自己的东西并不难(除了那个数据库统计部分),我只是想确保我没有不必要地重新发明轮子。

1 个答案:

答案 0 :(得分:1)

我知道这不是您要搜索的答案,但您可以尝试使用SpringSource的tc-Server Developer。在那里,您可以看到您正在寻找的所有信息。从Ruby on Rails更改为Grails后,我搜索了相同的信息。现在我对tc-Server解决方案很满意。

请参阅SpringSource网站上的视频:http://www.springsource.com/products/tcserver/devedition

这可能是SpringSource没有将Ruby on Rails样式输出包含到控制台的原因。我仍然想打开这个输出,但我也可以没有。