473,756 Members | 7,560 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 1811

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

Similar topics

3
6028
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 anybody have any experience debugging multithreaded apps in C# and could they share the best...
10
1494
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 http://msdn.microsoft.com/security/productinfo/xpsp2/default.aspx?pull=/library/en-us/dnwxp/html/xpsp2remotedebug.asp, and...
0
1235
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 attach to the aspnet_wp.exe in vs.net...should it not break at the points set in the compiled local...
14
8675
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 (ms-help://MS.VSCC.2003/MS.MSDNQTR.2003FEB.1033/vsdebug/html/vxtbsHTTPServer Errors.htm). I have seen...
8
2285
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 expand our development team, but we haven't been getting enough top-quality applicants. I was...
7
2596
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 have rights. My domain account is in the administrators group on the remote machine. I also have...
1
2026
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: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vsdebug/html/_core_Debugging_Preparation.asp unfortunately, I have...
3
2769
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 dll or PDB file? Thanks in advance! Rick
3
6628
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 to debug, without succes. I could connect to the remote machine only when the msvsmon.exe is in the...
0
9462
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 usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10046
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
9857
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 most users, this new feature is actually very convenient. If you want to control the update process,...
0
8723
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 launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7259
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5155
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 the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3817
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
2
3369
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2677
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.