开发者

How to access stack frame while debugging ASP.net program?

开发者 https://www.devze.com 2023-01-09 14:56 出处:网络
How to access s开发者_如何学Ctack frame information while debugging ASP.net program?If you\'re referring the \"Call Stack\" window, you can view that when debugging by opening the Call Stack Window us

How to access s开发者_如何学Ctack frame information while debugging ASP.net program?


If you're referring the "Call Stack" window, you can view that when debugging by opening the Call Stack Window using either it's default hotkey of CTRL+ALT+C, or by using the IDE menu of
Debug / Windows / Call Stack

Alternatively, if you're referring to ASP.NET's built-in Tracing capability, whereby the ASP.NET runtime will display diagnostic information about a single request for an ASP.NET page, you can achieve this on a per page basis by adding Trace="true" to the Page directive at the top of the specific page

For example:

<%@ Page Trace="true" Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="WebApplication1._Default" %>

or you can achieve ASP.NET tracing application-wide, by adding the <trace> directive to the <system.web> section of the web.config file. I.e.

<system.web>
  <trace enabled="true"/>
</system.web>


You can do that whether in page directive or web.config :

in page directive (in aspx file ) just add Trace="true" Or you can do that in web.config for all the pages

<trace enabled="true" pageOutput="true" requestLimit="10" traceMode="SortByTime" localOnly="true" /> 

enabled property turns tracing on or off

Hope this help


At page level you can do that with the help of

<%@ Page Trace="true".....................................

or you can also enable it from the codebehind in the page load method as Trace.Enabled = true;

Is this what you are looking for?

or you can try this link http://peterkellner.net/2009/12/21/how-to-get-a-stack-trace-from-c-without-throwing-exception/

0

精彩评论

暂无评论...
验证码 换一张
取 消