473,395 Members | 1,676 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

RQOTD -- random question of the day

How is compiling code in debug different from compiling in release?

:\\derian
Nov 20 '05 #1
5 1279
Cor
Hi Derian,
One of the most importants, you don't have to remember to put it back before
you start debugging.
Cor
How is compiling code in debug different from compiling in release?

Nov 20 '05 #2
holy cow!!! i was just asking myself that this weekend! i was going to run a
performance test to see if both exe's ran the same or if the debug version
was slower (more implied event delegates and hooks possibly setup to
communicate w/ an ide or trace util?).

i don't know...very good question!

steve
":\\derian" <de****@someplace.com> wrote in message
news:OT**************@TK2MSFTNGP11.phx.gbl...
| How is compiling code in debug different from compiling in release?
|
| :\\derian
|
|
Nov 20 '05 #3
Main thing is the creation of the (.pdb) file.

The (.pdb) file IS created during a debugging compilation, which stores info
about each CALL statement in the compiled file. This is what gives you the
info when an unhandled exception occurs, and also holds variables to be
displayed in the Watch windows in the IDE while in Break Mode.

Release compilation does not include this (.pdb) file, thus cannot be
debugged.....

":\\derian" <de****@someplace.com> wrote in message
news:OT**************@TK2MSFTNGP11.phx.gbl...
How is compiling code in debug different from compiling in release?

:\\derian

Nov 20 '05 #4
* "Cor" <no*@non.com> scripsit:
One of the most importants, you don't have to remember to put it back before
you start debugging.
How is compiling code in debug different from compiling in release?


And very important too: Don't distribute the Debug version.

;-)

--
Herfried K. Wagner
MVP · VB Classic, VB.NET
<http://www.mvps.org/dotnet>
Nov 20 '05 #5
Hi Derian,

One difference is that the Debug version contains more - guess what -
debugging information. ;-)

I don't actually know exactly what that info is, but part of it is the
line number in the source files of the current statement. This can be
determined from the stack trace.

Here are a couple of stack routines which might be interesting. The first
one shows the name of itself and the method that called it. The second show
the line number from which it was called. [This is untested as it doesn't work
in v2002 which is what I'm using]

Regards,
Fergus

<code>
Public Function MeAndMyCaller As String
Dim CurrentStack As New System.Diagnostics.StackTrace
Dim Myself As String = CurrentStack.GetFrame(0).GetMethod.Name _
& " " &CurrentStack.GetFrame(0).GetFileLineNumber
Dim MyCaller As String = CurrentStack.GetFrame(1).GetMethod.Name _
& " " &CurrentStack.GetFrame(1).GetFileLineNumber
Return "In " & Myself & vbCrLf & "Called by " & MyCaller
End Function

Public Function MyLineNumber As String
Dim CurrentStack As New System.Diagnostics.StackTrace
Dim MyCaller As String = CurrentStack.GetFrame(1).GetMethod.Name
Return CurrentStack.GetFrame(1).GetFileLineNumber.ToStrin g
End Function

Sub SomethingOrOther
Dim S As String = vbCrLf & MeAndMyCaller
S &= vbCrLf & vbCrLf & MyLineNumber
MsgBox (S)
End Sub
</code>
Nov 20 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
by: Nicholas Geraldi | last post by:
Im looking for a decent random number generator. Im looking to make a large number of random numbers (100 or so, if not more) in a short period of time (as fast as possible). the function i was...
28
by: Paul Rubin | last post by:
http://www.nightsong.com/phr/python/sharandom.c This is intended to be less predicable/have fewer correlations than the default Mersenne Twister or Wichmann-Hill generators. Comments are...
6
by: Acacia | last post by:
How would you generate a random number in C++?
10
by: Virus | last post by:
Ok well what I am trying to do is have 1.) the background color to change randomly with 5 different colors.(change on page load) 2,) 10 different quotes randomly fadeing in and out in random...
10
by: Johnny Snead | last post by:
Hey guys, Need help with this random sort algorithm private void cmdQuestion_Click(object sender, System.EventArgs e) { Random rnd = new Random(); //initialize rnd to new random object...
10
by: Marshall Belew | last post by:
I'm trying to synchronize a network app that uses random numbers generated by System.Random. Rather than pass every randomly generated number, I just pass the seed. I'm seeing a result that leads...
15
by: Steven Macintyre | last post by:
Hi all, I need to retrieve an integer from within a range ... this works ... below is my out puts ... it just does not seem so random ... Is there perhaps a suggestion out there to create a...
1
by: FAQ server | last post by:
----------------------------------------------------------------------- FAQ Topic - How do I generate a random integer from 1 to N?...
8
by: Daniel | last post by:
Hey guys Using Random(), how random is it, is it possible to be predicted? I have a requirement for a very good random number generator. I was doing something such as: Random randomSeed = new...
6
by: Mike Langworthy | last post by:
i can not seem to get this code to work. someone please help using System; using System.Collections.Generic; using System.Text; namespace ConsoleApplication1 { class Program {
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.