Solved

How to create a release build with debug set to pdbonly

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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
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…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

760 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

20 Experts available now in Live!

Get 1:1 Help Now