473,324 Members | 2,541 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 software developers and data experts.

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

http://www.hanselman.com/blog/CommentView,guid,339.aspx
--
Scott
Nov 17 '05 #1
2 2492
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" <sc*****@newsgroup.nospam> wrote in message
news:DD**********************************@microsof t.com...
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

Nov 17 '05 #2
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

"scottrm" <sc*****@newsgroup.nospam> escribió en el mensaje
news:DD**********************************@microsof t.com...
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

Nov 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Lord Bah | last post by:
I've seen some other posts referring to this problem, but didn't find any solutions. We're trying to log a call stack when we have a problem, using the StackTrace and StackFrame classes in C#....
2
by: Avinash | last post by:
Hi, I am facing problem with the use of the stackframe and stacktrace for the exception hadling with Windows service. Can any one please tell me how to use of the above objects (stackframe and...
0
by: Ben Fidge | last post by:
Hi When my ASP.NET application traps an exception, it's details and the call stack are written to a log, but for some reason, StackFrame.GetFileName() always returns null. This is when running...
2
by: HCF_15 | last post by:
Hi all, I have a small piece of code to use StackFrame to GetMethod, I found it is inconsistent in Debug version and Release version, is there anything I am doing wrong? Here is code, build in...
8
by: Mythran | last post by:
Here is some code the provides some really interesting results! First, read over the two methods in class 'A' and compare. Just by looking at them, both results appear to return the EXACT same...
2
by: newscorrespondent | last post by:
I have compiled in DEBUG mode but don't get the debug information from StackFrame class. Is there a specific setting I need to use so that information is included for a debug build. Thanks Tom
0
by: Gerrit Beuze | last post by:
Hi all, I'd like to get at the real underlying type when using the EnvDTE.Debugger Currently I do this: EnvDTE.Thread thread = dte.Debugger.CurrentThread; foreach (StackFrame frame in...
0
by: Random | last post by:
I'm trying to figure out a way to read parameter values from a prior function call in the StackFrame. I know reflection won't let me do this, it wasn't designed to do anything but report on static...
3
by: Ryanivanka | last post by:
hi, is the stackframe in managed code the same as in unmanaged? or they are not related at all.... :) if I use some asm codes (get the esp register or something about stackframe) in a...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.