Solved

How to create a release build with debug set to pdbonly

Posted on 2007-11-26
5
612 Views
Last Modified: 2013-12-16
Hello experts:

I am trying to isolate some trouble areas in an application that is currently in production and I've been advised to set debug equal to pdbonly so that I will have line numbers returns in my exception logging.  I currently have the production build in release mode with optimization, but I'm not sure how to change the debug value to pdbonly.

I am developing using C# in the 2.x Framework.

Any help is greatly appreciated...
0
Comment
Question by:escheider
  • 3
  • 2
5 Comments
 
LVL 37

Expert Comment

by:gregoryyoung
ID: 20353100
A release build is by default pdbonly the question is whether you copy over the .pdb files or not.
0
 
LVL 4

Author Comment

by:escheider
ID: 20353210
The .pdb files are currently in our test and qa environments, but are not in the production environment.   If pdbonly is the default, then how can I extract the stack trace that will contain the line number of the offending line of code [although I am aware that optimization will not make this an exact science]?

I am using a custom webservice to handle the logging, but here is what I am using to obtain the information I'm logging:
private void LogLastError()

        {

            string pageName = Request.Url.Segments[Request.Url.Segments.Length - 1];

            objErr = Server.GetLastError().GetBaseException();
 

            string err = pageName.PadRight(50) + "|" + Session["sessionid"] + "|" + objErr.Message + "|" + objErr.StackTrace;
 

            Logger.LogError(objErr, err);

            Server.ClearError();

        }

Open in new window

0
 
LVL 37

Accepted Solution

by:
gregoryyoung earned 125 total points
ID: 20353399
"The .pdb files are currently in our test and qa environments, but are not in the production environment.  "

Copy the pdbs to your production ... The simplest mechanism is to temporarily copy them to production

personally I would not do this ... I would take a memory dump at the offending time then load it up with the pdbs in the debugger but this is a pretty complex process and probably not one you want to learn....


Cheers,

Greg
0
 
LVL 4

Author Comment

by:escheider
ID: 20354771
Greg:

If the pdbs are the answer, then why am I not getting the line numbers in the test and qa environments running the identical release build?  Test, QA and Prod are identical environments.
0
 
LVL 4

Author Comment

by:escheider
ID: 20415274
Greg:

I have moved the pdbs to production and I am now receiving the stack trace I desired.  Thanks for your help.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
This article aims to explain the working of CircularLogArchiver. This tool was designed to solve the buildup of log file in cases where systems do not support circular logging or where circular logging is not enabled
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now