私はGlimpseが初めてです。私のセットアップ: MVC4、EF5、VS 2012、.NET 4.5。
Package Manager Console を使用して Glimpse をインストールしました。出力:
PM> Install-Package Glimpse
Successfully installed 'Glimpse 1.5.0'.
Successfully added 'Glimpse 1.5.0' to MyProject.Web.
PM> Install-Package Glimpse.AspNet
Attempting to resolve dependency 'Glimpse (= 1.4.2)'.
Successfully installed 'Glimpse.AspNet 1.3.1'.
Successfully added 'Glimpse.AspNet 1.3.1' to MyProject.Web.
PM> Install-Package Glimpse.Mvc4
Attempting to resolve dependency 'Glimpse.AspNet (= 1.3.0)'.
Attempting to resolve dependency 'Glimpse (= 1.4.2)'.
Successfully installed 'Glimpse.Mvc4 1.3.2'.
Successfully added 'Glimpse.Mvc4 1.3.2' to MyProject.Web.
PM> Install-Package Glimpse.Ado
Attempting to resolve dependency 'Glimpse (= 1.4.0)'.
Successfully installed 'Glimpse.Ado 1.4.1'.
Successfully added 'Glimpse.Ado 1.4.1' to MyProject.Web.
PM> Install-Package Glimpse.EF5
Attempting to resolve dependency 'Glimpse.Ado (= 1.4.1)'.
Attempting to resolve dependency 'Glimpse (= 1.4.0)'.
Successfully installed 'Glimpse.EF5 1.3.1'.
Successfully added 'Glimpse.EF5 1.3.1' to MyProject.Web.
閲覧中:
http://localhost/glimpse.axd
次の結果が得られます。
Registered Tabs:
Glimpse.Ado (1.4.1)
SQL - Glimpse.Ado.Tab.SQL - EndRequest
Glimpse.AspNet (1.3.1)
Configuration - Glimpse.AspNet.Tab.Configuration - EndRequest
Environment - Glimpse.AspNet.Tab.Environment - EndRequest
Request - Glimpse.AspNet.Tab.Request - EndRequest
Routes - Glimpse.AspNet.Tab.Routes - EndRequest
Server - Glimpse.AspNet.Tab.Server - EndRequest
Session - Glimpse.AspNet.Tab.Session - EndSessionAccess
Glimpse (1.5.0)
Timeline - Glimpse.Core.Tab.Timeline - EndRequest
Trace - Glimpse.Core.Tab.Trace - EndRequest
Runtime Policies:
Glimpse.AspNet (1.3.1)
Glimpse.AspNet.Policy.LocalPolicy - BeginRequest *This policy means that Glimpse won't run remotely.*
Glimpse (1.5.0)
Glimpse.Core.Policy.AjaxPolicy - BeginRequest
Glimpse.Core.Policy.ContentTypePolicy - EndRequest
Glimpse.Core.Policy.ControlCookiePolicy - BeginRequest
Glimpse.Core.Policy.GlimpseResourcePolicy - ExecuteResource
Glimpse.Core.Policy.StatusCodePolicy - EndRequest
Glimpse.Core.Policy.UriPolicy - BeginRequest
Detailed Settings:
Inspectors:
Glimpse.Ado (1.4.1)
Glimpse.Ado.Inspector.AdoInspector
Glimpse.AspNet (1.3.1)
Glimpse.AspNet.Inspector.RoutesInspector
Glimpse (1.5.0)
Glimpse.Core.Inspector.TraceInspector
Glimpse.EF5 (1.3.1)
Glimpse.EF.Inspector.EntityFrameworkInspector
Resources:
Glimpse (1.5.0)
glimpse_ajax - Glimpse.Core.Resource.AjaxResource - parentRequestId (True), hash (False), callback (False)
glimpse_client - Glimpse.Core.Resource.ClientResource - hash (False)
glimpse_config - Glimpse.Core.Resource.ConfigurationResource -
glimpse_history - Glimpse.Core.Resource.HistoryResource - top (False), hash (False)
glimpse_logo - Glimpse.Core.Resource.LogoResource - hash (False)
glimpse_metadata - Glimpse.Core.Resource.MetadataResource - hash (False), callback (False)
glimpse_popup - Glimpse.Core.Resource.PopupResource - requestId (True), hash (False)
glimpse_request - Glimpse.Core.Resource.RequestResource - requestId (True), hash (False), callback (False)
glimpse_sprite - Glimpse.Core.Resource.SpriteResource - hash (False)
glimpse_version_check - Glimpse.Core.Resource.VersionCheckResource - hash (False), stamp (True), callback (False)
Client Scripts:
Glimpse (1.5.0)
Glimpse.Core.ClientScript.Client - ClientInterfaceScript
Glimpse.Core.ClientScript.Data - RequestDataScript
Glimpse.Core.ClientScript.Metadata - RequestMetadataScript
Framework Provider: Glimpse.AspNet.AspNetFrameworkProvider
Html Encoder: Glimpse.Core.Extensibility.AntiXssEncoder
Logger: Glimpse.Core.Extensibility.NLogLogger
Persistence Store: Glimpse.Core.Framework.ApplicationPersistenceStore
Resource Endpoint: Glimpse.AspNet.HttpHandlerEndpointConfiguration
Serializer: Glimpse.Core.Extensibility.JsonNetSerializer
Default Resource: Glimpse.Core.Resource.ConfigurationResource - glimpse_config
Default Runtime Policy: Glimpse.Core.Extensibility.RuntimePolicy
Proxy Factory: Glimpse.Core.Framework.CastleDynamicProxyFactory
Message Broker: Glimpse.Core.Extensibility.MessageBroker
Endpoint Base Uri: ~/Glimpse.axd
Registered Packages:
NOTE, doesn't represent all the glimpse dependent Nuget packages you have installed, just the ones that have registered as a Glimpse Nuget package
Glimpse.Ado - 1.4.1
Glimpse.EF5 - 1.3.1
Glimpse - 1.5.0
Glimpse.AspNet - 1.3.1
Glimpse.Mvc4 - 1.3.2 <--- was missing earlier, but after clearing
temporary asp.net files, this appeared.
ブラウザに Glimpse アイコンが表示され、次のタブにデータが表示されます。
- 構成
- 環境
- リクエスト
- ルート
- SQL
- サーバ
- セッション
- タイムライン
- 痕跡
ただし、MVC4 に関連するタブはありません。
- 実行
- モデルバインディング
- メタデータ
- ビュー
この問題を解決しようとして失敗したこと。
ログに見られるように @Html.GlimpseClient() を使用しようとしましたが、それは役に立ちませんでした。このエラーが発生している場合でも、Glimpse アイコンと他のタブを表示できました。
カスタム モデル バインダーはありません。通常の MVC4 Web プロジェクトです。そのため、カスタム モデル バインダーの修正は機能しません。私は間違っているかもしれません。
「一時的なasp.netファイル」をクリアし、上記の「登録済みパッケージ:」リストにGlimpse.Mvc4 - 1.3.2が表示されます。ヴォラ!しかし、MVC 関連のタブがまだ表示されません。
今ここで立ち往生。私は他のタブのデータをとても楽しんでいますが、MVC タブも取得したいと思っています。
ログを垣間見る:
2013-07-23 02:23:50.2773 | DEBUG | RuntimePolicy set to 'ExecuteResourceOnly' by IRuntimePolicy of type 'Glimpse.Core.Policy.GlimpseResourcePolicy' during RuntimeEvent 'ExecuteResource'. |
2013-07-23 02:23:59.0328 | DEBUG | RuntimePolicy set to 'ExecuteResourceOnly' by IRuntimePolicy of type 'Glimpse.Core.Policy.GlimpseResourcePolicy' during RuntimeEvent 'ExecuteResource'. |
2013-07-23 02:24:07.2382 | DEBUG | RuntimePolicy set to 'ExecuteResourceOnly' by IRuntimePolicy of type 'Glimpse.Core.Policy.GlimpseResourcePolicy' during RuntimeEvent 'ExecuteResource'. |
2013-07-23 02:24:26.9564 | WARN | Unable to locate '</body>' with content encoding 'Unicode (UTF-8)'. Response may be compressed. |
2013-07-23 02:24:27.4934 | DEBUG | RuntimePolicy set to 'ExecuteResourceOnly' by IRuntimePolicy of type 'Glimpse.Core.Policy.GlimpseResourcePolicy' during RuntimeEvent 'ExecuteResource'. |
2013-07-23 02:24:41.8112 | DEBUG | RuntimePolicy set to 'ModifyResponseHeaders' by IRuntimePolicy of type 'Glimpse.Core.Policy.AjaxPolicy' during RuntimeEvent 'BeginRequest'. |
2013-07-23 02:24:42.7413 | DEBUG | RuntimePolicy set to 'ModifyResponseHeaders' by IRuntimePolicy of type 'Glimpse.Core.Policy.AjaxPolicy' during RuntimeEvent 'BeginRequest'. |
2013-07-23 02:24:55.0730 | DEBUG | RuntimePolicy set to 'ModifyResponseHeaders' by IRuntimePolicy of type 'Glimpse.Core.Policy.AjaxPolicy' during RuntimeEvent 'BeginRequest'. |
2013-07-23 02:24:59.2632 | DEBUG | RuntimePolicy set to 'ExecuteResourceOnly' by IRuntimePolicy of type 'Glimpse.Core.Policy.GlimpseResourcePolicy' during RuntimeEvent 'ExecuteResource'. |
2013-07-23 02:25:07.2067 | DEBUG | RuntimePolicy set to 'ExecuteResourceOnly' by IRuntimePolicy of type 'Glimpse.Core.Policy.GlimpseResourcePolicy' during RuntimeEvent 'ExecuteResource'. |
2013-07-23 02:25:12.0079 | DEBUG | RuntimePolicy set to 'ExecuteResourceOnly' by IRuntimePolicy of type 'Glimpse.Core.Policy.GlimpseResourcePolicy' during RuntimeEvent 'ExecuteResource'. |
2013-07-23 02:25:15.0111 | DEBUG | RuntimePolicy set to 'Off' by IRuntimePolicy of type 'Glimpse.Core.Policy.ContentTypePolicy' during RuntimeEvent 'EndRequest'. |
2013-07-23 02:25:15.0111 | DEBUG | RuntimePolicy set to 'Off' by IRuntimePolicy of type 'Glimpse.Core.Policy.ContentTypePolicy' during RuntimeEvent 'EndRequest'. |
2013-07-23 02:25:15.1161 | DEBUG | RuntimePolicy set to 'Off' by IRuntimePolicy of type 'Glimpse.Core.Policy.ContentTypePolicy' during RuntimeEvent 'EndRequest'. |
2013-07-23 02:25:15.3461 | DEBUG | RuntimePolicy set to 'ExecuteResourceOnly' by IRuntimePolicy of type 'Glimpse.Core.Policy.GlimpseResourcePolicy' during RuntimeEvent 'ExecuteResource'. |
2013-07-23 02:25:19.7284 | DEBUG | RuntimePolicy set to 'ExecuteResourceOnly' by IRuntimePolicy of type 'Glimpse.Core.Policy.GlimpseResourcePolicy' during RuntimeEvent 'ExecuteResource'. |