Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
BOOK: Professional Microsoft Robotics Studio ISBN: 978-0-470-14107-6
This is the forum to discuss the Wrox book Professional Microsoft Robotics Developer Studio by Kyle Johns, Trevor Taylor; ISBN: 9780470141076
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional Microsoft Robotics Studio ISBN: 978-0-470-14107-6 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 27th, 2008, 12:36 PM
Registered User
 
Join Date: Jun 2008
Location: , , USA.
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default Debugging other services

On bottom of page 126 there is mention of debugging other services by opening the corresponding source file in VS. I would like to know why this works. Can you provide an explanation or a reference with the details?

Thanks

Alex

 
Old June 27th, 2008, 07:29 PM
Wrox Author
 
Join Date: Apr 2008
Location: Brisbane, QLD, Australia.
Posts: 60
Thanks: 0
Thanked 5 Times in 5 Posts
Default

This is one of the cool features of Visual Studio.

As you know, when you compile a service, it creates a DLL. This DLL contains information about the source files(s) that it came from.

When you run the debugger, you will notice in the output window that it says "loading ..." for each of the DLLs as the program starts up. This is where it loads the symbol tables and figures out the associations between source and executable code. If you look very carefully in a code window with a breakpoint set, you will see that the red dot at the breakpoint changes to a red circle with a small yellow exclamation mark. Once the loading of symbols has completed, it turns back into a red dot. If it can't find the matching code, then it remains as a "broken breakpoint".

So, for example, if you have two services A and B you can open Service A in Visual Studio. Then Use File \ Open to open one of the source files from Service B. Set breakpoints in both A and B, and then run the debugger. Voila! You can "ping pong" backwards and forwards between the two services.

Note that you must have access to the source code for both services, and the source files must be in the same location as when they were compiled. If you move or rename a directory, then the association between the code and the source will break and you will have to re-compile the service.

Trevor


 
Old June 27th, 2008, 10:02 PM
Registered User
 
Join Date: Jun 2008
Location: , , USA.
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Great, thanks for the info. Will this work even if I open the source file using a drive mapping or over the network? Where is the path to the source file stored/checked?

Alex

 
Old June 30th, 2008, 05:48 AM
Wrox Author
 
Join Date: Apr 2008
Location: Brisbane, QLD, Australia.
Posts: 60
Thanks: 0
Thanked 5 Times in 5 Posts
Default

I don't know exactly how it works. The path is stored in the DLL somehow. I think it is a reference to the .pdb file. I'm not sure what happens if you use a mapped network drive. However, I believe that you must be using a source file that you have compiled from exactly the same location.

Trevor





Similar Threads
Thread Thread Starter Forum Replies Last Post
Debugging karthik_p VB Databases Basics 0 October 15th, 2005 01:06 PM
Help Debugging fs22 Javascript 3 May 17th, 2005 10:13 AM
Debugging Louisa VB.NET 2002/2003 Basics 1 March 18th, 2004 11:55 AM
debugging Adam H-W Classic ASP Basics 1 February 11th, 2004 02:30 PM
Need help debugging.... reg03 Beginning PHP 5 January 27th, 2004 03:51 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.