Stupid Question #203

Problems compiling? Don't understand the source code? Don't know how to code your feature? Post here.

Moderator: Moderators

Gratch06
Posts: 141
Joined: 2003-05-25 06:48
Location: USA

Stupid Question #203

Post by Gratch06 » 2003-07-24 03:34

[stupid question]I see all of these nice little dcdebug statements running through the program...where do they output to? A file? doesn't appear to be the main debugger window...I'm using VS.net 2002 if that matters.[/stupid question]

-Gratch06

GargoyleMT
DC++ Contributor
Posts: 3212
Joined: 2003-01-08 02:46
Location: .pa.us

Post by GargoyleMT » 2003-07-24 15:23

The dcdebug statements do output to the Output window of VS.NET when you run it under the debugger. They may, however, only appear when you're running a Debugging binary (where _DEBUG is defined during the build).

Exposing my newbie status, I just discovered recently that the output window has a dropdown (2003) that selects the build output, or the debugging output. Maybe you've got one of those selected?


BTW, how'd we get all the way up to 203? (Assuming one accepts the premise that it's a stupid question.)

TheParanoidOne
Forum Moderator
Posts: 1420
Joined: 2003-04-22 19:37

Post by TheParanoidOne » 2003-07-24 15:36

Someone will now post 202 stupid questions to make the thread title valid. :D
The world is coming to an end. Please log off.

DC++ Guide | Words

GargoyleMT
DC++ Contributor
Posts: 3212
Joined: 2003-01-08 02:46
Location: .pa.us

Post by GargoyleMT » 2003-07-24 18:22

Q001: How do you operate the telegramaphone whilst wearing gentlemen's sports gloves?

Gratch06
Posts: 141
Joined: 2003-05-25 06:48
Location: USA

Post by Gratch06 » 2003-07-25 23:09

TheParanoidOne wrote:Someone will now post 202 stupid questions to make the thread title valid.

Haven't they already done that? I've seen you answering a number of stupid questions all over the board ;)

GargoyleMT wrote:The dcdebug statements do output to the Output window of VS.NET when you run it under the debugger. They may, however, only appear when you're running a Debugging binary (where _DEBUG is defined during the build).


Mayhaps I need a little more explanation here...I assumed that if I went to the menus and did Debug --> Start, that I would be in debugging mode, and thus my dcdebug statements would appear in the output window....Do I have the wrong concept of debugging here, and if so, how can I fix it?

GargoyleMT wrote:the output window has a dropdown (2003) that selects the build output, or the debugging output. Maybe you've got one of those selected?

Good suggestion here, but in my version, it automatically changes between the two when I hit Debug --> Start. Here is an example of what I see in my Output --> debug window:

Code: Select all

...
'oDC.exe': Loaded 'C:\WINNT\system32\wshtcpip.dll', Cannot find or open a required DBG file.
'oDC.exe': Loaded 'C:\WINNT\system32\riched20.dll', Cannot find or open a required DBG file.
First-chance exception at 0x77eab2f0 in oDC.exe: Microsoft C++ exception: Exception @ 0x0140fd44.
The thread 'Win32 Thread' (0x590) has exited with code 0 (0x0).
The thread 'Win32 Thread' (0x530) has exited with code 0 (0x0).
First-chance exception at 0x77eab2f0 in oDC.exe: Microsoft C++ exception: SocketException @ 0x0160ff64.
The thread 'Win32 Thread' (0x2ac) has exited with code 0 (0x0).
First-chance exception at 0x77eab2f0 in oDC.exe: Microsoft C++ exception: SocketException @ 0x018bfee4.
The thread 'Win32 Thread' (0x4a0) has exited with code 0 (0x0).
The thread 'Thread::starter' (0x550) has exited with code 0 (0x0).
The thread 'Win32 Thread' (0x510) has exited with code 0 (0x0).
The thread 'Win32 Thread' (0x2ac) has exited with code 0 (0x0).
The thread 'Win32 Thread' (0x548) has exited with code 1 (0x1).
The thread 'Win32 Thread' (0x270) has exited with code 1 (0x1).
The thread 'Win32 Thread' (0x544) has exited with code 1 (0x1).
The program '[1440] oDC.exe: Native' has exited with code 1 (0x1).


EDIT --------
Guess I should include the code segment I'm trying to use the debugger in...

Code: Select all

void SearchFrame::onSearchResult(SearchResult* aResult) {
   // Check that this is really a relevant search result...
   dcdebug("This is a test");
   ...


-Gratch06

GargoyleMT
DC++ Contributor
Posts: 3212
Joined: 2003-01-08 02:46
Location: .pa.us

Post by GargoyleMT » 2003-07-27 15:36

Gratch06 wrote:Mayhaps I need a little more explanation here...I assumed that if I went to the menus and did Debug --> Start, that I would be in debugging mode, and thus my dcdebug statements would appear in the output window....Do I have the wrong concept of debugging here, and if so, how can I fix it?


Perhaps you have it wrong. What I refer to as a debugging build is the combo box in the toolbar with two choices - "Release" (Optimized, mostly stripped of debugging information) and "Debug" (full of debug information, also has _DEBUG defined, useful for #ifdefs, etc.).


Good suggestion here, but in my version, it automatically changes between the two when I hit Debug --> Start. Here is an example of what I see in my Output --> debug window:


That sounds like the right behavior. Once I type in 2003, it switches back to the Build output, not the Debug one, which really confused me. :wink:

[quote]Guess I should include the code segment I'm trying to use the debugger in...[/quote
Sure, did you set a breakpoint on that? Just click in the gray margin until you get a red circle by the statement. Though once you're running the application it will move the breakpoint to the next statement it can break on (ie. that it generated code for - so you can't set a breakpoint where you declare variables, for instance).


I hope this is of help...

Who is online

Users browsing this forum: Google [Bot] and 0 guests