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
|