debug application from remote server

dzung

New member
Joined
Aug 4, 2019
Messages
1
Programming Experience
1-3
Hi there,
I am using Visual Studio 2015. When I create a website project with web location as FTP (remote server), Is it possible to have an other copy of the project on my local machine?
The reason being is when comes to debugging, it is much easier to debug using the local files than the ones on the server.

thanks
 

jmcilhinney

C# Forum Moderator
Staff member
Joined
Apr 23, 2011
Messages
2,351
Location
Sydney, Australia
Programming Experience
10+
It is generally a much better idea to create a web application rather than a web site. You can then just run it in the debugger in the same way as you would a Windows application. I'm not sure that I've ever created a web site other than for a quick test years ago, so I'm not sure of all the implications. I would suggest that you convert to a web application if you can. If not, most projects can have multiple publish profiles so I would think that a web site could too, but I don't know that for a fact.
 

Sheepings

Senior Programmer
Joined
Sep 5, 2018
Messages
277
Location
UK
Programming Experience
10+
You could try Remote debugging - Visual Studio

But being completely honest this is not how i do it. If I am about to deploy a new application on a server, I ensure that the server i am testing on will be using the exact same configuration and operating system as the deployment server It'll initially be installed on. This is of course easier for me to play with such resources at my disposal since I have my own data network with a range of my own servers used for customer hosted projects, all of which are running solusvm; thus enables me to run a range of virtual environments to test on. If you can, try to get a remote viewing screen (a VNC server) and install VS2019 or VS community on your server and debug it in the remote viewer of a VNC client. There are a range of VNC clients out there that you can use for this and for free, if you google around and you don't need to play around with any other remote files, scripts or configurations. Once your project is working, you can then transfer it to the live environment on your deployment server.
 

Skydiver

Well-known member
Joined
Apr 6, 2019
Messages
291
Location
Virginia Beach, VA
Programming Experience
10+
Remote debugging as pointed to in the link above isn't hard as long as you can have somebody help you open the necessary ports and do the initial steps of running the debugging proxy on the server. The way I've "convinced" web admins to help me do this is by telling them they can either just run this proxy on their end under their complete control of when to start and stop the proxy and knowing exactly which accounts to allow to connect, or they can grant me remote desktop access and I install VS on their machine. They usually opt for the proxy. :) Of course, I need to show they good faith evidence that trying to reproduce the problem on my side completely fails to reproduce the problem, and so this is why I am asking for their help.
 
Top Bottom