Cortana app logss

I am developing a Cortana application (a C # Windows application) and I use the following commands to print debugging information:

System.Diagnostics.Debug.WriteLine("voiceCommandName: " + voiceCommandName);
System.Diagnostics.Debug.WriteLine("textSpoken: " + textSpoken);

My question is: where should I look for these texts / debug output when I use cortana to run my application?

+4
source share
2 answers

A trace listener is an option, but you can also configure Visual Studio to wait for the application to start and automatically bind:

  • In the visual studio, open the properties page of your project.
  • Go to the debug options page
  • Enable "Do not run, but debug my code when it runs" (for C # projects, this is slightly different for winjs / C ++ projects)
  • VS.
  • VS.

VS , , . Cortana , VS , , ..

, Cortana background. Cortana , , , .

+2

, /. , ? - TextWriterTraceListener.

https://msdn.microsoft.com/en-us/library/system.diagnostics.textwritertracelistener(v=vs.110).aspx

, , . , , , . .

<configuration>
  <system.diagnostics>
    <trace autoflush="false" indentsize="4">
      <listeners>
        <add name="myListener" 
          type="System.Diagnostics.TextWriterTraceListener" 
          initializeData="TextWriterOutput.log" />
        <remove name="Default" />
      </listeners>
    </trace>
  </system.diagnostics>
</configuration>
+3

Source: https://habr.com/ru/post/1625891/


All Articles