![]() | |
![]() |
| | Thread Tools | Search this Thread | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I have a service running fairly well but it still has some bugs in it that I can not reproduce in my test environment. It is a multi-threaded application! My question: is there a way to connect Visual Studio 2005 (sp1) to the program to debug the code while it is still running at a remote site? If I could just single step the program while it is failing, I am sure I would get the answer very quickly. Thanks, -- SteveS |
#3
| |||
| |||
|
|
Yes, you can debug it remotely. Recompile the windows service in debug mode, install it, run the remote debugging monitor on the remote server (http://msdn2.microsoft.com/en-us/library/xf8k2h6a.aspx), start the service, and use visual studio to connect to the remote process. Be aware that it will be difficult at best to debug any code in the OnStart method based on how fast you can click to attach to the service after you start it so it best that you move any code out of that method. -- Bryan Phillips MCT, MCSD, MCDBA, MCSE Microsoft MVP - Client Application Development Blog: http://bphillips76.spaces.live.com Web Site: http://www.composablesystems.net "SteveS" <srs (AT) perfectionsremovenospamsoftware (DOT) com> wrote in message news 0E8EB2C-6990-4FC5-BF9A-0C26C9EE98BC (AT) microsoft (DOT) com:I have a service running fairly well but it still has some bugs in it that I can not reproduce in my test environment. It is a multi-threaded application! My question: is there a way to connect Visual Studio 2005 (sp1) to the program to debug the code while it is still running at a remote site? If I could just single step the program while it is failing, I am sure I would get the answer very quickly. Thanks, -- SteveS |
#4
| |||
| |||
|
|
I have successfully attached to the process but there is no code to look at? How do I single step if there is no code? How do I load the source code up? -- SteveS "Bryan Phillips" wrote: Yes, you can debug it remotely. Recompile the windows service in debug mode, install it, run the remote debugging monitor on the remote server (http://msdn2.microsoft.com/en-us/library/xf8k2h6a.aspx), start the service, and use visual studio to connect to the remote process. Be aware that it will be difficult at best to debug any code in the OnStart method based on how fast you can click to attach to the service after you start it so it best that you move any code out of that method. -- Bryan Phillips MCT, MCSD, MCDBA, MCSE Microsoft MVP - Client Application Development Blog: http://bphillips76.spaces.live.com Web Site: http://www.composablesystems.net "SteveS" <srs (AT) perfectionsremovenospamsoftware (DOT) com> wrote in message news 0E8EB2C-6990-4FC5-BF9A-0C26C9EE98BC (AT) microsoft (DOT) com:I have a service running fairly well but it still has some bugs in it that I can not reproduce in my test environment. It is a multi-threaded application! My question: is there a way to connect Visual Studio 2005 (sp1) to the program to debug the code while it is still running at a remote site? If I could just single step the program while it is failing, I am sure I would get the answer very quickly. Thanks, -- SteveS |
#5
| |||
| |||
|
|
Did you compile in Debug mode? If so, try stepping a few times to see if the debugger stopped just before your code. -- Bryan Phillips MCT, MCSD, MCDBA, MCSE Microsoft MVP - Client Application Development Blog: http://bphillips76.spaces.live.com Web Site: http://www.composablesystems.net "SteveS" <srs (AT) perfectionsremovenospamsoftware (DOT) com> wrote in message news CF5D753-1EB1-4830-B16B-A91976FDF00F (AT) microsoft (DOT) com:I have successfully attached to the process but there is no code to look at? How do I single step if there is no code? How do I load the source code up? -- SteveS "Bryan Phillips" wrote: Yes, you can debug it remotely. Recompile the windows service in debug mode, install it, run the remote debugging monitor on the remote server (http://msdn2.microsoft.com/en-us/library/xf8k2h6a.aspx), start the service, and use visual studio to connect to the remote process. Be aware that it will be difficult at best to debug any code in the OnStart method based on how fast you can click to attach to the service after you start it so it best that you move any code out of that method. -- Bryan Phillips MCT, MCSD, MCDBA, MCSE Microsoft MVP - Client Application Development Blog: http://bphillips76.spaces.live.com Web Site: http://www.composablesystems.net "SteveS" <srs (AT) perfectionsremovenospamsoftware (DOT) com> wrote in message news 0E8EB2C-6990-4FC5-BF9A-0C26C9EE98BC (AT) microsoft (DOT) com:I have a service running fairly well but it still has some bugs in it that I can not reproduce in my test environment. It is a multi-threaded application! My question: is there a way to connect Visual Studio 2005 (sp1) to the program to debug the code while it is still running at a remote site? If I could just single step the program while it is failing, I am sure I would get the answer very quickly. Thanks, -- SteveS |
#6
| |||
| |||
|
|
I compiled in Debug mode (I think) and now I am getting the following message after I hit Break All: No symbols are loaded for any call stack frame. The source code cannot be displayed. OK or Show Disassembly -- SteveS "Bryan Phillips" wrote: Did you compile in Debug mode? If so, try stepping a few times to see if the debugger stopped just before your code. -- Bryan Phillips MCT, MCSD, MCDBA, MCSE Microsoft MVP - Client Application Development Blog: http://bphillips76.spaces.live.com Web Site: http://www.composablesystems.net "SteveS" <srs (AT) perfectionsremovenospamsoftware (DOT) com> wrote in message news CF5D753-1EB1-4830-B16B-A91976FDF00F (AT) microsoft (DOT) com:I have successfully attached to the process but there is no code to look at? How do I single step if there is no code? How do I load the source code up? -- SteveS "Bryan Phillips" wrote: Yes, you can debug it remotely. Recompile the windows service in debug mode, install it, run the remote debugging monitor on the remote server (http://msdn2.microsoft.com/en-us/library/xf8k2h6a.aspx), start the service, and use visual studio to connect to the remote process. Be aware that it will be difficult at best to debug any code in the OnStart method based on how fast you can click to attach to the service after you start it so it best that you move any code out of that method. -- Bryan Phillips MCT, MCSD, MCDBA, MCSE Microsoft MVP - Client Application Development Blog: http://bphillips76.spaces.live.com Web Site: http://www.composablesystems.net "SteveS" <srs (AT) perfectionsremovenospamsoftware (DOT) com> wrote in message news 0E8EB2C-6990-4FC5-BF9A-0C26C9EE98BC (AT) microsoft (DOT) com:I have a service running fairly well but it still has some bugs in it that I can not reproduce in my test environment. It is a multi-threaded application! My question: is there a way to connect Visual Studio 2005 (sp1) to the program to debug the code while it is still running at a remote site? If I could just single step the program while it is failing, I am sure I would get the answer very quickly. Thanks, -- SteveS |
#7
| |||
| |||
|
|
For some reason, it can't find your debug symbols. Open the modules window, right-click your exe, and select load symbols. It should prompt you for the location of the symbols. -- Bryan Phillips MCT, MCSD, MCDBA, MCSE Microsoft MVP - Client Application Development Blog: http://bphillips76.spaces.live.com Web Site: http://www.composablesystems.net "SteveS" <srs (AT) perfectionsremovenospamsoftware (DOT) com> wrote in message news:F24A72CD-34A9-4A5B-869A-4DD2AC203AF1 (AT) microsoft (DOT) com: I compiled in Debug mode (I think) and now I am getting the following message after I hit Break All: No symbols are loaded for any call stack frame. The source code cannot be displayed. OK or Show Disassembly -- SteveS "Bryan Phillips" wrote: Did you compile in Debug mode? If so, try stepping a few times to see if the debugger stopped just before your code. -- Bryan Phillips MCT, MCSD, MCDBA, MCSE Microsoft MVP - Client Application Development Blog: http://bphillips76.spaces.live.com Web Site: http://www.composablesystems.net "SteveS" <srs (AT) perfectionsremovenospamsoftware (DOT) com> wrote in message news CF5D753-1EB1-4830-B16B-A91976FDF00F (AT) microsoft (DOT) com:I have successfully attached to the process but there is no code to look at? How do I single step if there is no code? How do I load the source code up? -- SteveS "Bryan Phillips" wrote: Yes, you can debug it remotely. Recompile the windows service in debug mode, install it, run the remote debugging monitor on the remote server (http://msdn2.microsoft.com/en-us/library/xf8k2h6a.aspx), start the service, and use visual studio to connect to the remote process. Be aware that it will be difficult at best to debug any code in the OnStart method based on how fast you can click to attach to the service after you start it so it best that you move any code out of that method. -- Bryan Phillips MCT, MCSD, MCDBA, MCSE Microsoft MVP - Client Application Development Blog: http://bphillips76.spaces.live.com Web Site: http://www.composablesystems.net "SteveS" <srs (AT) perfectionsremovenospamsoftware (DOT) com> wrote in message news 0E8EB2C-6990-4FC5-BF9A-0C26C9EE98BC (AT) microsoft (DOT) com:I have a service running fairly well but it still has some bugs in it that I can not reproduce in my test environment. It is a multi-threaded application! My question: is there a way to connect Visual Studio 2005 (sp1) to the program to debug the code while it is still running at a remote site? If I could just single step the program while it is failing, I am sure I would get the answer very quickly. Thanks, -- SteveS |
#8
| |||
| |||
|
|
In the Modules windows the path show the local installation of the executable even though I "Attached to Process" on the remote machine?? So I uninstalled the local install in "Add/Remove programs" and it still points to the local path (c:\program files...)? I then did as you suggested and I navigated over the network to the proper folder and found the .pdb file, then when I click it says "The symbol file PerfWS.pdb does not match the module"? Why is this so difficult? What should I do? -- SteveS "Bryan Phillips" wrote: For some reason, it can't find your debug symbols. Open the modules window, right-click your exe, and select load symbols. It should prompt you for the location of the symbols. -- Bryan Phillips MCT, MCSD, MCDBA, MCSE Microsoft MVP - Client Application Development Blog: http://bphillips76.spaces.live.com Web Site: http://www.composablesystems.net "SteveS" <srs (AT) perfectionsremovenospamsoftware (DOT) com> wrote in message news:F24A72CD-34A9-4A5B-869A-4DD2AC203AF1 (AT) microsoft (DOT) com: I compiled in Debug mode (I think) and now I am getting the following message after I hit Break All: No symbols are loaded for any call stack frame. The source code cannot be displayed. OK or Show Disassembly -- SteveS "Bryan Phillips" wrote: Did you compile in Debug mode? If so, try stepping a few times to see if the debugger stopped just before your code. -- Bryan Phillips MCT, MCSD, MCDBA, MCSE Microsoft MVP - Client Application Development Blog: http://bphillips76.spaces.live.com Web Site: http://www.composablesystems.net "SteveS" <srs (AT) perfectionsremovenospamsoftware (DOT) com> wrote in message news CF5D753-1EB1-4830-B16B-A91976FDF00F (AT) microsoft (DOT) com:I have successfully attached to the process but there is no code to look at? How do I single step if there is no code? How do I load the source code up? -- SteveS "Bryan Phillips" wrote: Yes, you can debug it remotely. Recompile the windows service in debug mode, install it, run the remote debugging monitor on the remote server (http://msdn2.microsoft.com/en-us/library/xf8k2h6a.aspx), start the service, and use visual studio to connect to the remote process. Be aware that it will be difficult at best to debug any code in the OnStart method based on how fast you can click to attach to the service after you start it so it best that you move any code out of that method. -- Bryan Phillips MCT, MCSD, MCDBA, MCSE Microsoft MVP - Client Application Development Blog: http://bphillips76.spaces.live.com Web Site: http://www.composablesystems.net "SteveS" <srs (AT) perfectionsremovenospamsoftware (DOT) com> wrote in message news 0E8EB2C-6990-4FC5-BF9A-0C26C9EE98BC (AT) microsoft (DOT) com:I have a service running fairly well but it still has some bugs in it that I can not reproduce in my test environment. It is a multi-threaded application! My question: is there a way to connect Visual Studio 2005 (sp1) to the program to debug the code while it is still running at a remote site? If I could just single step the program while it is failing, I am sure I would get the answer very quickly. Thanks, -- SteveS |
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
| |