2012-03-20 2 views

답변

5

당신은 이런 식으로 작업을 수행 할 수 있습니다

static public void WaitForUserToContinueTheTest(
    EmbeddableDocumentStore documentStore) 
{ 
    if (Debugger.IsAttached == false) 
     return; 

    documentStore.DatabaseCommands.Put("Pls Delete Me", null, 
     RavenJObject.FromObject(new { 
      StackTrace = new StackTrace(true) 
     }), new RavenJObject()); 

    documentStore.Configuration.AnonymousUserAccessMode = 
     AnonymousUserAccessMode.All; 

    using (var server = new HttpServer(documentStore.Configuration, 
     documentStore.DocumentDatabase)) 
    { 
     server.StartListening(); 

     // start the server 
     Process.Start(documentStore.Configuration.ServerUrl); 

     do 
     { 
      Thread.Sleep(100); 
     } while (
      documentStore.DatabaseCommands.Get("Pls Delete Me") != null && 
       Debugger.IsAttached); 
    } 
} 

이 뜻은 당신을 위해 서버를 열고, 당신은 RavenDB 내부에서 일어나는 모든 일을 볼 수있게된다.

+1

감사합니다. 모든 엔티티를 Debug에 로깅하기 위해 뭔가를 첨부하는 것이 더 간단한 지 궁금합니다. 하지만 지금은 내 문제를 해결할 것입니다. –

관련 문제