Author Topic: debugging - step into with VS8  (Read 4477 times)

Offline yaro

  • Single posting newcomer
  • *
  • Posts: 8
debugging - step into with VS8
« on: January 24, 2007, 12:42:35 am »
I compiled wxWidgets 2.8 in debug mode in visual studio 8, created a wxWidgets project in latest codeblocks with the wizzard. The project uses VS8 for compilation. Wizard was complaining but after setting up all paths and dependencies it compiles and debugs my application.

But sometimes breakpoints don't work, especially if they are set on a line that has only a comment. If set on a line that has a statement then they work.
However I can't do step-in once breakpoint occurs. When I press shift+F7 and want to see what happens in a wxWidgets call, nothing happens. This works perfect in VS8 and is crucial to debug bugs in function calls with incorrect parameters or find bugs in used libraries.
I really need step-in, I can't use codeblocks if it doesn't work with VS8 :(
I also tried adding the wxWidgets src path with all the cpp files to the Debugger options in project preferences (C:\work\wxWidgets-2.8.0\src) but it didn't help.

Does it work for anybody?

Offline AmR EiSa

  • Multiple posting newcomer
  • *
  • Posts: 75
Re: debugging - step into with VS8
« Reply #1 on: January 24, 2007, 02:07:57 am »
Hi ,
codeblocks doesn't work with VS8 in debug mode . at last in this time .
codeblocks use GDB form MinGW .
I think you can use MinGW that will help you move your Project to anther OS with GCC

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: debugging - step into with VS8
« Reply #2 on: January 24, 2007, 09:11:43 am »
When I press shift+F7 and want to see what happens in a wxWidgets call, nothing happens. This works perfect in VS8 and is crucial to debug bugs in function calls with incorrect parameters or find bugs in used libraries.

You can't step-in if there are no debug symbols for that code. Have a look in the debugger's logs (both of them) for error messages regarding symbols reading.
Be patient!
This bug will be fixed soon...

Offline yaro

  • Single posting newcomer
  • *
  • Posts: 8
Re: debugging - step into with VS8
« Reply #3 on: January 24, 2007, 12:00:44 pm »
I link against the same wxWidgets debug .lib files which have debug symbols. I also use multi threaded DLL debug runtime library /MTd.

If I link against the same wxWidgets lib files in VS8, step in works.

I should also mention that I can step past "return xx" in "bool MyApp::OnInit()" and get into wxWidgets app.h, but didn't manage to get to any *.cpp file ever. So I don't think the reason is what you described.

In debugger window there is:

Building to ensure sources are up-to-date
Build succeeded
Selecting target: Debug
Adding source dir: C:\work\wxWidgets-2.8.0\src
Adding source dir: C:\work\wxWidgets-2.8.0\lib\vc_lib
Adding source dir: c:\work\CodeBlocks\projects\wxTest1\
Adding source dir: c:\work\CodeBlocks\projects\wxTest1\
Adding file: bin\Debug\wxTest1.exe
Starting debugger: done
Setting breakpoints
quit:
Microsoft (R) Windows Debugger  Version 6.6.0007.5
Copyright (c) Microsoft Corporation. All rights reserved.
CommandLine: bin/Debug/wxTest1.exe
Symbol search path is: C:/work/wxWidgets-2.8.0/src;C:/work/wxWidgets-2.8.0/lib/vc_lib;c:/work/CodeBlocks/projects/wxTest1/;SRV*c:\work\localsymbols*http://msdl.microsoft.com/download/symbols
Executable search path is:
ModLoad: 00400000 0089f000   wxTest1.exe
ModLoad: 7c900000 7c9b0000   ntdll.dll
ModLoad: 7c800000 7c8f4000   C:\WINDOWS\system32\kernel32.dll
ModLoad: 773d0000 774d3000   C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.2982_x-ww_ac3f9c03\COMCTL32.dll
ModLoad: 77c10000 77c68000   C:\WINDOWS\system32\msvcrt.dll
ModLoad: 77dd0000 77e6b000   C:\WINDOWS\system32\ADVAPI32.dll
ModLoad: 77e70000 77f01000   C:\WINDOWS\system32\RPCRT4.dll
ModLoad: 77f10000 77f57000   C:\WINDOWS\system32\GDI32.dll
ModLoad: 77d40000 77dd0000   C:\WINDOWS\system32\USER32.dll
ModLoad: 77f60000 77fd6000   C:\WINDOWS\system32\SHLWAPI.dll
ModLoad: 774e0000 7761d000   C:\WINDOWS\system32\ole32.dll
ModLoad: 77120000 771ac000   C:\WINDOWS\system32\OLEAUT32.dll
ModLoad: 763b0000 763f9000   C:\WINDOWS\system32\comdlg32.dll
ModLoad: 7c9c0000 7d1d5000   C:\WINDOWS\system32\SHELL32.dll
ModLoad: 10200000 10320000   C:\WINDOWS\WinSxS\x86_Microsoft.VC80.DebugCRT_1fc8b3b9a1e18e3b_8.0.50727.42_x-ww_f75eb16c\MSVCR80D.dll
(50c.c10): Break instruction exception - code 80000003 (first chance)
eax=00251eb4 ebx=7ffde000 ecx=00000003 edx=00000008 esi=00251f48 edi=00251eb4
eip=7c901230 esp=0012fb20 ebp=0012fc94 iopl=0         nv up ei pl nz na po nc
cs=001b  ss=0023  ds=0023  es=0023  fs=003b  gs=0000             efl=00000202
ntdll!DbgBreakPoint:
7c901230 cc              int     3
*** WARNING: Unable to verify checksum for wxTest1.exe
Breakpoint 1 hit
At c:/work/CodeBlocks/projects/wxTest1/app.cpp:16

In Code::Blocks debug there is:
[12:08:24.000]: Scanned 0 files for #includes, cache used 0, cache updated 0
[12:08:24.015]: Scanned 0 files for #includes, cache used 0, cache updated 0
[12:08:24.015]: Scanned 0 files for #includes, cache used 0, cache updated 0

As u can see from "Symbol search path is: " it does have access to the directory where pdb files for wxWidgets are.
I dont know what logs do you mean exactly. If I run the CB with /d switch I don't see any logs on my disk or any new windows in CB.
« Last Edit: January 24, 2007, 12:09:38 pm by yaro »

Offline yaro

  • Single posting newcomer
  • *
  • Posts: 8
Re: debugging - step into with VS8
« Reply #4 on: January 24, 2007, 12:16:26 pm »
I found out how to enable Debugger(debug) window which shows log of the debugger.

This is what I found:

ModLoad: 5ad70000 5ada8000   C:\WINDOWS\system32\uxtheme.dll
ModLoad: 74720000 7476b000   C:\WINDOWS\system32\MSCTF.dll
Breakpoint 1 hit
>   16:    wxsOK = wxsOK && wxXmlResource::Get()->Load(_T("newdialog.xrc"));
0:000>
> ?? wxsOK
bool true
0:000>
virtual void CDB_driver::StepIn(): Not implemented in driver

Is it not implemented?

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: debugging - step into with VS8
« Reply #5 on: January 24, 2007, 12:45:21 pm »
virtual void CDB_driver::StepIn(): Not implemented in driver

Is it not implemented?

Hmm, if the log says so :). Sorry but I haven't worked with cdb lately so I couldn't remember its status...
Be patient!
This bug will be fixed soon...