Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / Managed C++ / April 2008

Tip: Looking for answers? Try searching our database.

debug on client's computer (without debugger?)

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
WJ - 11 Apr 2008 13:52 GMT
I have a VC++ application that just crashes on one tester/client's machine.
It runs fine everywhere else.

What are the other options to debug (on the client's machine) without
installing VC++ (on the clinet's machine)? Is this possible at all? Thanks.

WJ
WJ - 11 Apr 2008 14:04 GMT
To add some more details, this is a managed-unmanaged mixed application, not
a pure managed C++ application.

Thanks.

WJ

> I have a VC++ application that just crashes on one tester/client's machine.
> It runs fine everywhere else.
[quoted text clipped - 3 lines]
>
> WJ
Cholo Lennon - 11 Apr 2008 14:22 GMT
> To add some more details, this is a managed-unmanaged mixed
> application, not a pure managed C++ application.
[quoted text clipped - 11 lines]
>>
>> WJ

1st: Deploy your application with .pdb information.

2nd: Install a debugger who can understand a .pdb file like WinDbg (Debugging
tools for Windows, freeware, 16/20Mb,
http://www.microsoft.com/whdc/devtools/debugging/default.mspx) or IDA Pro
(http://www.hex-rays.com/idapro/)

3rd: Run you application under the debugger.

Regards

--
Cholo Lennon
Bs.As.
ARG
WJ - 11 Apr 2008 14:34 GMT
Where should the .pdb files be installed? Thanks!

> > To add some more details, this is a managed-unmanaged mixed
> > application, not a pure managed C++ application.
[quoted text clipped - 27 lines]
> Bs.As.
> ARG
Cholo Lennon - 11 Apr 2008 15:02 GMT
> Where should the .pdb files be installed? Thanks!

Usually in the same directory of your executable. Some debuggers allow you to
load the pdb file from a custom location.

--
Cholo Lennon
Bs.As.
ARG
WJ - 11 Apr 2008 15:47 GMT
Hi Cholo,
Do you know if WinDBG supports managed-unmanaged mixed applications? I have
troulbe to get the symbol files loaded.

Thanks.

WJ

> > Where should the .pdb files be installed? Thanks!
>
[quoted text clipped - 5 lines]
> Bs.As.
> ARG
Cholo Lennon - 11 Apr 2008 16:22 GMT
> Hi Cholo,
> Do you know if WinDBG supports managed-unmanaged mixed applications?
> I have troulbe to get the symbol files loaded.

AFAIK yes. Maybe you need SOS.dll. Take a look to:

"SOS: It's Not Just an ABBA Song Anymore"
http://msdn2.microsoft.com/es-ar/magazine/cc164138(en-us).aspx

"SOS Debugging Extension (SOS.dll)"
http://msdn2.microsoft.com/en-us/library/bb190764(VS.80).aspx

--
Cholo Lennon
Bs.As.
ARG
WJ - 11 Apr 2008 17:18 GMT
Hi Cholo,
This may sould a dumb question -- I do need to copy source files to the
client computer also, correct?

Thanks.

WJ

> > Hi Cholo,
> > Do you know if WinDBG supports managed-unmanaged mixed applications?
[quoted text clipped - 12 lines]
> Bs.As.
> ARG
Cholo Lennon - 11 Apr 2008 21:41 GMT
> Hi Cholo,
> This may sould a dumb question -- I do need to copy source files to
> the client computer also, correct?

Not necessarily. Pdb file has enough information stored in it (check
http://msdn2.microsoft.com/en-us/library/yd4f8bd1(VS.80).aspx) to allow a
complete debug session.

Try debugging this simple program (using their pdb and exe files and using/not
using source code) to check what WinDbg shows you (load application and press F5
(go), then open the disassembly window):

// Try disabling compiler optimizations before compiling
// for better understanding
#include <iostream>

using namespace std;

struct Test
{
   Test() {  cout << __FUNCTION __ << endl; }
   ~Test() {  cout << __FUNCTION __ << endl; }
   void Foo() { cout << __FUNCTION __ << endl; }
};

int main(int, char**)
{
   // Force a breakpoint into debugger
   __asm int 3;

   // Test code
   int a = 10;
   cout << a + 20 << endl;

   Test test;
   test.Foo();

   Test pTest = new Test;
    pTest->Foo();
   delete pTest;

   return 0;
}

Of course, with WinDbg you don't have the same level of details as VS integrated
debugger (unless you load the source code), but in general it's enough (at least
for me). A disassembler/debugger like IDA Pro is another case. It's really
fantastic, you don't need the source code. Even without pdb file IDA shows you a
big amount of information that simplify the debugging process.

--
Cholo Lennon
Bs.As.
ARG
David Lowndes - 11 Apr 2008 14:48 GMT
>I have a VC++ application that just crashes on one tester/client's machine.
>It runs fine everywhere else.
>
>What are the other options to debug (on the client's machine) without
>installing VC++ (on the clinet's machine)? Is this possible at all? Thanks.

Use the remote debugger - in later versions of VS you can run the
remote debugger on the client computer from a share on your dev
machine. In earlier versions it requires a minimal install of the
remote debugger component.

Dave
WJ - 11 Apr 2008 14:57 GMT
Hi David,
Will you please explain a little detail about the share part? Is the share
on the DEV machine or on the client's machine? And I assume you'll put Exe
and DLLs under the share? Thanks!

WJ

> >I have a VC++ application that just crashes on one tester/client's machine.
> >It runs fine everywhere else.
[quoted text clipped - 8 lines]
>
> Dave
David Lowndes - 11 Apr 2008 16:58 GMT
>Will you please explain a little detail about the share part? Is the share
>on the DEV machine or on the client's machine?

The share is on the machine you have VS installed on.

Have a look for "How to: Set Up Remote Debugging" on MSDN for more
information.

Dave

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.