Archive for October 2nd, 2007|Daily archive page
StackTrace in .net difference for Debug and Release compilation modes
Today I’ve tried to build new version of our DataLayer – Diego. Unsuccessfully L But I have discovered some interesting stuff around StackFrames in .net I’ve build sample project. In debug mode .net gives access to full stack trace. And in release mode we have just information about method that makes call and called method. There is test project to check it :
using System; using System.Collections.Generic; using System.Text; using System.Diagnostics; using System.Reflection; namespace Tester {
{
{ r.runit(“hello”, 4); } }
{
{
{ processFrame(frame); } }
{
{
} } }
{
{ Execute(); } } } |
And there we have result for Debug mode:
Frames count : 3 Method name: Execute Method name: runit Parameter name : name Parameter name : count Method name: Main Parameter name : args |
Results for Release mode:
Frames count : 2 Method name: Execute Method name: Main Parameter name : args |