Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

How to create a release build with debug set to pdbonly

Posted on 2007-11-26
5
Medium Priority
?
622 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…

636 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