0
votes

Local Debugging Fine

I would like to attach a Visual Studio debugger to my WCF application (w3wp.exe worker process). I can do that successfully on my developement server where I have Visual Studio installed locally.

How to Debug on EC2?

Now I need to occasionally do that on my production server which is an Amazon Web Services EC2 instance.

  • With regards to remote debugging MSDN says: Debugging over the internet is not supported. - So is there no way to attach a debugger remotely to a WCF application running on an EC2 instance?
  • The only solution I know is that I have to install Visual Studio on the EC2 instance (time and disk space) as well as put the source code there, and then use local debugging? Hoping for an alternative and better solution?
2
debugging on prod environment is not good practise, will log not help? - Brijesh Mishra
@BrijeshMishra I agree to an extent, but I do need to debug in the early stages in the production environment, mainly before it is live; and more to the point, I should have added I would like to move my dev server to the cloud as well - Cel

2 Answers

1
votes

Not a best practise but you could have one EC2 instance or EBS snapshot where Visual Studio is installed. Bring that up to debug effectively locally by RDP'ing into that server and then when you are finished you can swap back to the clean production server.

1
votes

If installing VS is a problem, you can setup a VPN client and the Remote Tools (which is much smaller than VS install).

The idea is to setup a VPN between your machine and the EC2 instance, install Remote Tools (actually you might not even need to do that, just run msvsmon.exe) and connect using the VPN.

More info:

My blog post

remote debugger over internet