StackFrame class

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • scottrm

    StackFrame class

    I am using StackFrame class to retrieve File Name and File Line number for
    printing out into the debug file.

    Everything is working under Debug build. However StackFrame doesn't capture
    File Name and File Line Info in release build.

    Is there anyway or any class which can be used as an alternative?

    see this link for more info

    Scott Hanselman is blogging about open source, .NET, and the cloud.



    --
    Scott
  • Ignacio Machin \( .NET/ C# MVP \)

    #2
    Re: StackFrame class

    Hi,

    In release the extra debug info needed to get this information is not
    included in the EXE, as it occupy space. Why don't you just use the debug
    version?


    cheers,

    --
    Ignacio Machin,
    ignacio.machin AT dot.state.fl.us
    Florida Department Of Transportation


    "scottrm" <scottrm@newsgr oup.nospam> wrote in message
    news:DDF475FF-E2A7-4895-87F4-4ACAE8B06ABA@mi crosoft.com...[color=blue]
    >I am using StackFrame class to retrieve File Name and File Line number for
    > printing out into the debug file.
    >
    > Everything is working under Debug build. However StackFrame doesn't
    > capture
    > File Name and File Line Info in release build.
    >
    > Is there anyway or any class which can be used as an alternative?
    >
    > see this link for more info
    >
    > http://www.hanselman.com/blog/CommentView,guid,339.aspx
    >
    >
    > --
    > Scott[/color]


    Comment

    • Carlos J. Quintero [.NET MVP]

      #3
      Re: StackFrame class

      This is "by design". That info requires a .pdb file which is generated only
      in Debug configuration. Supposedly you ship debug versions during the betas,
      and you ship a release version for the final build, when bugs have been
      fixed (in theory).

      However, you can configure the Debugging behavior of the Release
      configuration in the Project properties window (Configuration Properties,
      Build node, Generate Debugging Information field).

      --

      Best regards,

      Carlos J. Quintero

      MZ-Tools: Productivity add-ins for Visual Studio .NET, VB6, VB5 and VBA
      You can code, design and document much faster.
      Free resources for add-in developers:
      MZ-Tools has a single goal: To make your everyday programming life easier. As an add-in to several Integrated Development Environment (IDEs) from Microsoft, MZ-Tools adds new menus and toolbars to them that provide many new productivity features.


      "scottrm" <scottrm@newsgr oup.nospam> escribió en el mensaje
      news:DDF475FF-E2A7-4895-87F4-4ACAE8B06ABA@mi crosoft.com...[color=blue]
      >I am using StackFrame class to retrieve File Name and File Line number for
      > printing out into the debug file.
      >
      > Everything is working under Debug build. However StackFrame doesn't
      > capture
      > File Name and File Line Info in release build.
      >
      > Is there anyway or any class which can be used as an alternative?
      >
      > see this link for more info
      >
      > http://www.hanselman.com/blog/CommentView,guid,339.aspx
      >
      >
      > --
      > Scott[/color]


      Comment

      Working...