Skip to content

Commit c58bd75

Browse files
committed
More formatting fixes
1 parent 6b343d3 commit c58bd75

1 file changed

Lines changed: 30 additions & 28 deletions

File tree

support/azure/app-service/troubleshoot-dotnet-visual-studio.md

Lines changed: 30 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -310,54 +310,56 @@ For information about how to create application logs in WebJobs, see [How to wor
310310
1. Add a `using System.Diagnostics;` statement to the top of the file.
311311

312312
### View the tracing output locally
313+
313314
1. Press F5 to run the application in debug mode.
314315

315-
The default trace listener writes all trace output to the **Output** window, along with other Debug output. The following illustration shows the output from the trace statements that you added to the `Index` method.
316+
The default trace listener writes all trace output to the **Output** window, along with other Debug output. The following illustration shows the output from the trace statements that you added to the `Index` method.
316317

317318
![Tracing in Debug window](./media/web-sites-dotnet-troubleshoot-visual-studio/tws-debugtracing.png)
318-
319-
The following steps show how to view trace output in a web page, without compiling in debug mode.
319+
320+
The following steps show how to view trace output in a web page, without compiling in debug mode.
320321
1. Open the application Web.config file (the one located in the project folder) and add a `<system.diagnostics>` element at the end of the file just before the closing `</configuration>` element:
321322

322-
``` xml
323-
<system.diagnostics>
324-
<trace>
325-
<listeners>
326-
<add name="WebPageTraceListener"
327-
type="System.Web.WebPageTraceListener,
328-
System.Web,
329-
Version=4.0.0.0,
330-
Culture=neutral,
331-
PublicKeyToken=b03f5f7f11d50a3a" />
332-
</listeners>
333-
</trace>
334-
</system.diagnostics>
335-
```
323+
``` xml
324+
<system.diagnostics>
325+
<trace>
326+
<listeners>
327+
<add name="WebPageTraceListener"
328+
type="System.Web.WebPageTraceListener,
329+
System.Web,
330+
Version=4.0.0.0,
331+
Culture=neutral,
332+
PublicKeyToken=b03f5f7f11d50a3a" />
333+
</listeners>
334+
</trace>
335+
</system.diagnostics>
336+
```
336337

337338
The `WebPageTraceListener` lets you view trace output by browsing to `/trace.axd`.
339+
338340
1. Add a [trace element](/previous-versions/dotnet/netframework-4.0/6915t83k(v=vs.100)) under `<system.web>` in the Web.config file, such as the following example:
339341

340-
``` xml
341-
<trace enabled="true" writeToDiagnosticsTrace="true" mostRecent="true" pageOutput="false" />
342-
```
342+
``` xml
343+
<trace enabled="true" writeToDiagnosticsTrace="true" mostRecent="true" pageOutput="false" />
344+
```
343345

344346
1. Press CTRL+F5 to run the application.
345347
1. In the address bar of the browser window, add *trace.axd* to the URL, and then press Enter (the URL is similar to `http://localhost:53370/trace.axd`).
346348
1. On the **Application Trace** page, click **View Details** on the first line (not the BrowserLink line).
347349

348-
:::image type="content" source="./media/web-sites-dotnet-troubleshoot-visual-studio/tws-traceaxd1.png" alt-text="Screenshot of the Application Trace page in a web browser showing View Details selected on the first line.":::
350+
:::image type="content" source="./media/web-sites-dotnet-troubleshoot-visual-studio/tws-traceaxd1.png" alt-text="Screenshot of the Application Trace page in a web browser showing View Details selected on the first line.":::
349351

350-
The **Request Details** page appears, and in the **Trace Information** section you see the output from the trace statements that you added to the `Index` method.
352+
The **Request Details** page appears, and in the **Trace Information** section you see the output from the trace statements that you added to the `Index` method.
351353

352-
:::image type="content" source="./media/web-sites-dotnet-troubleshoot-visual-studio/tws-traceaxd2.png" alt-text="Screenshot of the Request Details page in a web browser showing a message highlighted in the Trace Information section.":::
354+
:::image type="content" source="./media/web-sites-dotnet-troubleshoot-visual-studio/tws-traceaxd2.png" alt-text="Screenshot of the Request Details page in a web browser showing a message highlighted in the Trace Information section.":::
353355

354-
By default, `trace.axd` is only available locally. If you wanted to make it available from a remote app, you could add `localOnly="false"` to the `trace` element in the *Web.config* file, as shown in the following example:
356+
By default, `trace.axd` is only available locally. If you wanted to make it available from a remote app, you could add `localOnly="false"` to the `trace` element in the *Web.config* file, as shown in the following example:
355357

356-
```xml
357-
<trace enabled="true" writeToDiagnosticsTrace="true" localOnly="false" mostRecent="true" pageOutput="false" />
358-
```
358+
```xml
359+
<trace enabled="true" writeToDiagnosticsTrace="true" localOnly="false" mostRecent="true" pageOutput="false" />
360+
```
359361

360-
However, enabling `trace.axd` in a production app is not recommended for security reasons. In the following sections, you'll see an easier way to read tracing logs in an App Service app.
362+
However, enabling `trace.axd` in a production app is not recommended for security reasons. In the following sections, you'll see an easier way to read tracing logs in an App Service app.
361363

362364
### View the tracing output in Azure
363365

0 commit comments

Comments
 (0)