You can Debug your Task Code from Visual Studio, same like you debug your other .NET Code. You just need to set Debug Mode for your project before you hit the START button. If you run the application in Debug Mode, then, you will be able to set Break Point in your code and Step Through. Please note, when you are running the Deployment Task in Debug Mode, if any Exception occurs, the debugger will Break to the statement where you get the Exception. In that way it will be easy for you to debug Exceptions. If you run the application in Release Mode, then Exception will not break the debugger.