?
Solved

How to create a release build with debug set to pdbonly

Posted on 2007-11-26
5
Medium Priority
?
619 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 500 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

Quick Cloud Training

Looking for some quick training on the cloud in 2 hours or less? Check out these how-to guides in AWS, Linux, OpenStack, Azure, and more!

Question has a verified solution.

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

Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
Suggested Courses

752 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