Skip to main content

Posts

Showing posts with the label Code Editor

Debugging .Net Components called from Python, being run from a Batch Script, executed by the Windows Task Scheduler (Part 2)

In  Part 1  We identified the problem i was recently asked to investigate and looked at getting some output from the batch script being run by the Windows Task Scheduler. As this was a production environment, there was little that could be modified and remote debugging wasn't an option. In this part 2 post, we will continue to fault find touching on the Python and .Net components i mentioned previously and get to the point where the problem is fully identified and subsequently fixed without any changes made to the production code. Having started to receive output, the next step was to make some sense of it. The first thing i did was wrap the area of interest in the python script with a try catch 1) some generic exception try: except: print "Exception: %s" % (sys.exc_info()[0]) Exception: Query Error This was at least a start in that it looked database related at this point The next task was to identify the type of exception being thrown ...

Azure Portal - Web-based code editor for App Services

A feature that caught my eye is the App Service Editor , a preview addition to the  Development Tools  section of the navigation bar of your app in the Azure Portal. ☁ In essence it is a  web-based editor for App Service. That's right, you can edit and save your web site LIVE with a clean, easy to use, web editor! We have already come to love the Visual Studio Team Services code editor, which allows code and config edits pre-deployment but this feature is production level, post deploy / release. Cannot stress how useful this is for quick fixes and post deployment edits which would otherwise mean re-deploying or falling back to FTP. Project  Kudu  has been around for a while now but great to see it appearing as a first class citizen in the portal. The underlying functionality is provided by the  Monaco Editor , which powers Visual Studio Code . It is worth noting that if Continuous Integration (CI) has been enabled for your application, that t...

Debugging a Batch Script, managed by the Windows Task Scheduler (Part 1)

I was contacted recently with an interesting problem that had arisen for a client where a batch script was not working as expected and silently failing in a production environment. It was being run by the Windows Task Scheduler which was reporting a '1' return code from the Task : Action  history. As the script was configured to run silently there was no easy way to see what was going wrong.  The Event Log did not contain anything useful and u nfortunately, the batch script didn't contain any logging statements. There was also a strong desire not to install any remote tooling or alter the code as it had been working previously and was currently servicing. I thought i would share the steps taken to identify and fix the issue as it is not uncommon to be faced with a black box, which seemingly doesn't offer much at first glance, but with a little investigation, the lights can soon be turned back on. Understanding the Stack After some investigation it became ...