473,581 Members | 2,338 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Remote Debugging - Best Practices

The MSDN documentation on remote debugging is a bit sparse, to say the
least, and there is almost no information available on the 'best' way to
configure this. I should note that my development system is Windows XP
Pro and the test machine is Windows 2003, both running the latest
upgrades; Visual Studio 2005 is installed on the development system and
the .Net 2.0 framework is installed on the test system. The two systems
do not have the same directory structure or physical disk layout (the
development system boots from the C drive and the test system boots from
the D drive, for example). The code being written contains some logic
that only executed properly under Windows 2003 (for example, not all WMI
information works properly from Windows XP). I log into both systems
as myself, and I always ensure that the remote debug utility is running
on the test system.

I should also note that all of the service applications I write are
coded as console applications, and if a specific command line parameter
is passed, then the code executes in console mode and not as a service.
This permits me to control the testing more effectively at certain points.

I have tried several options, some of which work and some of which do
not, and some used to work and are now failing!

1. Install Visual Studio 2005 on the test system and do development
there. Not acceptable, and not very efficient.

2. Expose the development directory as a share and set debugging to use
an external program (from the shared directory as a UNC refererence:
\\Development\P roductName\Vers ion\Source\Serv ices\MyService\ bin\Debug\MySer vice.exe),
the working directory set to the same reference, the command line set to
"-ConsoleMode", and the remote system specified. This used to work, but
now the console window pops up on the remote system and then a
SecurityExcepti on is thrown! I have verified that the zone security for
the intranet is set to full trust, which used to permit this to work,
but no more!

3. I followed the instructions on MSDN for "Remote Debugging of a
Project Built Locally", but I could not get this to work until I figured
out that the external program reference is on the remote system but the
working directory in evaluated relative to the local system! After that,
this approach worked, but it is a pain to have to copy the executable
images to the remote system every time I want to debug! I can add a
post-build command (XCOPY) to copy the files automatically, but this is
a lot of editing to modify the debug configuration each time!

4. Copy the binaries to the remote system, launch them and attach to the
running process -- this prevents me from debugging the launch process,
which is often critical, and is the reason for defining my service
applications as console applications in the first place.

Are there any better approaches? Can anyone tell me why approach #2 is
generating a SecurityExcepti on and how I might avoid this problem?

-ken
Feb 27 '06 #1
0 1801

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
6009
by: Development | last post by:
I am creating 10 threads that do ecatly the same thing. I am having a very hard time debugging this scenario. It seems that by default when you are doing f10 or f11 all threads execute. You can see that by watching the thread window. When you freeze all threads but the one you are working on it then does not do anything. So does...
10
1482
by: Sorin Sandu | last post by:
After I applied XP SP2 I am unable to debug. I get : Error trying to run project : unable to start debugging on the web server. The debugger component on the server failed to connect to the local machine. Even after I disable the ICF I get the same error. I made all the changes from...
0
1231
by: yurps | last post by:
I got remote debugging setup...but now I am confused how it works. Must I open the remote website from the file share in visual studio.net...and then set break-points there. Can I not just choose Copy Project...on the web project on my local drive...setting it to compile with debug switched on. Then open a browser to the remote site and...
14
8659
by: | last post by:
I cannot for the life of me get remove debugging to work. I continue to receive "Error while trying to run project: Unable to start debugging on the web server. Access is denied. Verify that you are an administrator or member of the Debugger Users". I have followed...
8
2277
by: Nicholas Reville | last post by:
Hi, I hope this is an OK spot for this question: I'm a co-founder of the Participatory Culture Foundation (pculture.org), we're a non-profit that develops Democracy Player and some related internet TV tools (see getdemocracy.com). Democracy Player has a Python backend with native front-ends for Mac, Windows, and Linux. We're looking to...
7
2583
by: | last post by:
I'm writing an ASP.NET app, using Visual Studio 2003. VS is running locally on my laptop, but the web app is running on a remote server. My laptop is not in the domain. I do have a domain account. I had no issue creating the web app on the remote server after authenticating with the domain account, but I can't debug. It complains that I don't...
1
2020
by: CK | last post by:
Hello All, I have been trying to setup remote debugging for web part development by running through the steps in the following documentation: Debugging Web Parts: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/odc_SP2003_ta/html/sharepoint_debugwebparts.asp Debug Settings and Preparation:...
3
2743
by: Rick | last post by:
We have a web site that was built as an ASP.Net Web Site, I am unable to remote debug, when build ing the web site there is not a dll or PDB file generated. I can debug on my local machine but unable to attach to the process when running from the web server. Can someone tell me how to remote debug an ASP.Net Website that does not genate a...
3
6615
by: Yves Gagnon | last post by:
Hi, I try to debug a WCF hosted in a windows services on a serveur that is on an other domaine then my developpement machine. I tried many things without succes. Here is what I tried: First I installed on the server I want to debug, the remote debugger tools from the VS 2005 CD. I just install the windows application. I tried from there...
0
7862
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7789
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
1
7894
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
6551
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
5361
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3803
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3820
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2300
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1400
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.