StackFrame class

G

Guest

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
 
I

Ignacio Machin \( .NET/ C# MVP \)

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,
 
C

Carlos J. Quintero [.NET MVP]

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:
http://www.mztools.com
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top