kbmax
kbmax

Reputation: 614

Error debugging worker role in Azure

All the sudden started getting the following error while trying to debug a worker role:

"Windows Azure Tools for Microsoft Visual Studio

There was an error attaching the debugger to the role instance 'deployment16(360)blah blah' with Process Id: '8780'. Unable to attach. The Microsoft Visual Studio Remote Debugging Monitor has been closed on the remote machine."

Restarting Visual Studio and the machine do not help.

Upvotes: 1

Views: 3187

Answers (3)

roufamatic
roufamatic

Reputation: 18485

If you have an exception in the role's OnStart() or in Application_Start() that the debugger doesn't pick up, you may also receive this message. Application_Start() errors are especially pernicious because the debugger doesn't attach to the web process until after this method returns.

If you are wedded to cloud specific classes such as RoleEnvironment and cannot make the web role a startup project, you can use Ctrl-F5 to run the cloud project without debugging. With some luck you'll get a yellow screen of death to show you the true error.

Upvotes: 2

GraemeMiller
GraemeMiller

Reputation: 12253

Avkash covers the points.

I had the same issue recently. I set my web project as start-up rather than Azure and I discovered that that web project didn't actually run. Turned out somehow when of my projects was compiling for X64. I changed that and it worked.

Upvotes: 0

AvkashChauhan
AvkashChauhan

Reputation: 20556

As you start getting this problem all of sudden in your development machine something must have changed and it is mostly due to some of the OS auto-update and/or some application update you installed in your machine. There could be any random reason for this problem however if I would have hit the exact same problem here is what I would do to troubleshoot such issue:

  1. To start, first thing is to just check it is not an application specific problem by creating a base app from web/worker template and see if that exhibit the problem.
  2. If you have installed new release Windows Azure SDK 1.7 check with both SDK 1.6 and 1.7 to verify if both exhibit the problem.
  3. Check if your could debug IIS based application as well outside Compute Emulator. This will isolate if the problem is specific to Windows Azure development Fabric or bind to your IIS itself.
  4. If this is IIS specific issue, Check IIS configuration for all enabled functionalities, try resetting Application Pool configuration, running "ASPnet_regiis -i" etc to fix the issue.
  5. If it is Windows Azure Computer Emulator specific, I know sometime OS updates may make application unstable so in that case, I will re-install .net 4.0 and VS2010 SP1 again respectively. (This does help so many time) then re-install Azure SDK 1.7 completely.

Such random problem mostly occur due to some change in your machine configuration, so restoring the VS2010 and the re-installing all other application does help to solve problems.

Upvotes: 2

Related Questions