Cel Cel - 24 days ago 12
C# Question

Debugging WCF application with Visual Studio on AWS EC2 instance

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?


Answer

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.