Skip to main content

Remote debugging Windows azure cloud service - Worker Role


Remote debugging Windows azure cloud service - Worker Role


Very recently I was working on design and development of a worker role component of cloud service. Locally debugging worker role is pretty easy. You just need to know that you need to set Cloud project as a start-up project and ready to go.
Problem is when you deploy worker role to azure and trying to troubleshoot an unknown issue.  Thankfully we have remote debugging enable for cloud services – both web and worker roles. This is really handy tool to remotely debug without having to putting a lot of tracing and digging into it. However, remote debugging in worker role/web role requires few steps to be followed:
  • Make sure you are debugging from same machine where you published
  • Make sure to turn on Remote debugger on while you publish (This should be turned off for Production publish profiles)
  • Make sure to Select Debug mode
  • With all the above settings after you publish, you should be able to Attach Debugger as shown below picture
 
  • For Worker role, you need to make sure to select WaWorkerHost.exe process. For Web role, you can select W3wp.exe
  • Now the process should hit the break points in your code.


Happy Coding!!! 

Popular posts from this blog

Debugging code running on Remote machine

Before performing below steps, you need to make sure you have pdb files matching dll version on the remote machine.  Open below folder in your remote machine C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\Remote Debugger\x64  Open that folder and launch as admin  msvsmon.exe  Select all options to allow firewall From Tools > Options  - Keep the settings to default (as shown below) and click ok.  At this point your remote debugger is all set. You need to connect from Visual Studio by entering Machine IP: Port (4022) 

Implement Serverside ViewState

If you think your website is running slowly and you need to improve performance by 150% in short time . This may help you a lot. ASP.NET ViewState is a great mechanism that simplifies the life of ASP.NET developers. But, as everybody knows, the .NET Framework saves the ViewState data as a hidden field on your ASPX page. If your page has only a few controls, this is not a problem. But, if your page has some Panel s and/or some DataGrid s, with the technique demonstrated on this article, you could reduce dramatically the load time of the page.

Web Functional Testing Automation using CasperJS and Nodejs

Background We are in era the of Web, Mobility and AI. Days are gone where we used to think Javascript is just for client side validation check before submitting web forms. Thanks to ECMAScript5 and above which advanced javascript language way forward. Many Enterprises across the world already building applications using lot of opensource Javascript technologies.  Automating the Testing of any web application is becoming challenging and critical for the business. Challenge is in terms of manage and maintain test hygiene throughout the application life cycle and overall product quality. The ideal behavior of any test automation is to be able to integrate as part of CI and CD  (Continuous Deployment)  build and be able to run without manual test run effort and publish test results with code coverage metrics. There are many different frameworks available in the market to solve automation problem. To name few:  CodedUI -  Browser based test automa...