Solved

How to create a release build with debug set to pdbonly

Posted on 2007-11-26
5
618 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 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
This is a high-level webinar that covers the history of enterprise open source database use. It addresses both the advantages companies see in using open source database technologies, as well as the fears and reservations they might have. In this…
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…

717 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