Debugging a deployed cloud service app - azure

How can a deployed cloud service application be debugged?
I am trying to render a RDLC report in my application using Topics & Subscriptions.
Whenever I run the cloud app locally, I don't receive any errors. But as soon as I deploy it over the cloud, I get an error which aren't described up to an extent so that it can be rectified.
I found that the error comes when the report is ready to be rendered and not anywhere else.
I am looking for a possible mechanisms (inserting breakpoints like we do locally, etc.) using which it is possible to debug a deployed cloud app.
Since I am using VS2012 Express & professional, intellitrace does not work here.

You need to enable Remote Debugging for your Role, and you will be able to debug your code in the cloud with any type of Visual Studio.

I don't think you can, however Intellitrace was build for that purpose. You enable Intellitrace in your cloud instances, and then you can "playback" that instance locally, thus debugging and spotting the exceptions thrown.
Here's MSDN's article on that
http://msdn.microsoft.com/en-us/library/vstudio/dd264915.aspx

Having Intellitrace only in the most expensive version of Visual Studio makes developing for Azure far more expensive than it is advertised at. There are some situations, such as when a role is starting up, that you pretty much can't do anything without Intellitrace. If you find that you are in one of those edge cases 'evaluate' VS ultimate in a local virtual machine. You may need to re-evaluate at some point in the future, in which case you will need another VM.

Related

Debugging a node.js project in Visual Studio 2022

I'm trying to expand a sudoku web application that I've checked out locally with visual studio 2022, namely this one: https://github.com/michel-kraemer/sudocle
My goal is to implement additional functionality and I'm using this as a learning experience in frontend development since I'm currently only doing backend. I can get the application to run in my localhost using node.js as detailed in the readme and I can modify some very basic things (e.g. changing texts) but to really get started, I would like to debug the application as it's running on my local server. The expectation is that I could set breakpoints in function that I want to modify to see the state of variables at runtime.
This is where I'm stuck. I've tried attaching the debugger to various processes and I can get it started from the next.config.js file, however I think it's not connected to my localhost then and I'm not sure how to trigger any functions from that point. Maybe I'm also misunderstanding the functions of a debugger in a web application.
For what it's worth, those are the sites I've been reading trying to solve my issue, so far with no luck:
https://github.com/Microsoft/nodejstools/wiki/Debugging
https://learn.microsoft.com/en-us/visualstudio/debugger/troubleshooting-breakpoints?view=vs-2022
https://code.visualstudio.com/docs/nodejs/nodejs-debugging#_auto-attach
F5 or Start Debugging Button is Greyed Out for Winform application?
https://learn.microsoft.com/en-us/visualstudio/debugger/debugger-feature-tour?view=vs-2022
I hope a more experienced dev can help me out here.

How can I take advantage of ServiceFabric Autorefresh?

I recently read about ServiceFabric offering some kind of Autorefresh mode, considering its infrastructure and the cluster running independently.
So, according to what I've wrote, all I need to do it go to my project, check the properties and set the "Application Debug Mode" to Refresh Application.
Basically that is what I did now, but I don't quite see the difference. There's no repackaging happening at all.
Do I have to run some kind of cmdlet in the background, as it is the case with e.g. webpack watch?
The docs explains Refresh Application as follow.
Refresh Application This mode enables you to quickly change and debug
your code and supports editing static web files while debugging. This
mode only works if your local development cluster is in 1-Node mode.
This is the default Application Debug Mode.
On other application debug options, Visual Studio creates a package and deploy it to the cluster and register the application to run on Service Fabric, the package will contain all binaries compiled that are needed to run the application.
The main difference between the Refresh Application and the others, is that the package created is a symbolic link to the source in the Dev machine, you are not actually copying the package with the binaries, when you change the static files, it will be the same files used by the deployed application in SF, this will make more flexible to make changes without repackaging, registering and deploying the application on every change.
PS: It does not work the same way as the watch feature for nodeJs development, it is just to avoid the package deployment. You could just reload the page though.
This post explain in more details.

Selenium and Azure Web App

I have an app using Selenium's ChromeDriver to click and retrieve a file from a website. I have decided to publish it as an Azure Job, would I still be able to run parts of the code that interface the ChromeDriver?
Also, I prefer not to use PhantomJS as sometimes it throws an error that the element is unclickable.
Many thanks in advance for your help.
Might not be possible on Azure App Service.
From https://github.com/projectkudu/kudu/wiki/Azure-Web-App-sandbox#unsupported-frameworks
Unsupported Frameworks
[...]
PhantomJS/Selenium: tries to connect to local address, and also uses GDI+.
If you can convince Selenium to not bind to a socket on 127.0.0.1 and if you're not using stuff that hooks into GDI+ then it MAY work, it's a long shot though.
Try Cloud Services with a Worker Role instead or a VM (IaaS).
I deployed a few functional tests (Phantom) in a Webrole (Cloud Services) and everything went without a hitch. In my particular case i'm calling those tests from the build server over REST.

Themes in Orchard hosted in Azure

I've been setting up Orchard 1.8 in an Azure Cloud Service. I've got it working, but I'm now confused as to how to use it.
Installing themes via the gallery fails silently. The devs say this is because Orchard on Azure doesn't support the theme gallery, and suggest adding new themes to the project and uploading a new package (https://orchard.codeplex.com/discussions/453688). Ignoring that this requires any designers that want to make minor CSS changes now need Visual Studio, access to the entire source code, and then wait through a 20 minute deploy, this just doesn't seem possible.
This post explains how the Azure emulator doesn't work with Orchard. So now I'm confused; what is the expected workflow for a brand new Orchard site hosted on Azure if I can't make changes to the site in production or staging but cannot run it locally either. I'm aware I could run it without the Azure emulator on regular IIS but that seems to be too far removed from the production environment to be a good test.
I was drawn to Orchard originally because it had great documentation and supports MVC Web API, but this seems so fundamental that now I'm not so sure. I feel like every time something goes wrong they'll always be doubt whether it's working as designed or if there is an Azure idiosyncrasy going on.
I'd love to hear from anyone who's had an Orchard site from scratch in Azure, I'm hoping I've just missed something simple with this.
Thanks,
Tom
You should never install modules or themes on a production server. Instead, install those on your dev machine, build the package and then deploy. If you don't want to deal with the heaviness of cloud services, don't use cloud services. Azure Web Sites are about a million times easier to use, and they work great. They allow for what you're asking for.

Windows azure cloud development

I am new to cloud computing. I created a new cloud solution using Visual Studio 2010.
I need to deploy my solution somewhere in order to test it.
As I saw in my researches, I should have an account on http://www.microsoft.com/windowsazure/account/
Currently i do not have an account there, so where should I deploy my application, and how can i test it?
If you go here: http://msdn.microsoft.com/en-us/windowsazure/cc974146.aspx you can download the whole SDK and other tools which essentially allows you to run Azure on your local machine. It requires you to have SQL Server installed.
Apologies for the lack of details, it's quite a while since I did it myself. But, poke around on that page and you'll find all the tools and documenation you need. It's a big, hairy thing to get your head around so you'll need to set some time aside to just read, sadly.
Best resource to get started is the Azure training kit, get it here:
http://www.microsoft.com/downloads/en/details.aspx?FamilyID=413e88f8-5966-4a83-b309-53b7b77edf78&displaylang=en
Watch some videos then dive into the labs, the best teacher is hands on experience.

Resources