Cyberiafreak

"Fortunate are those who take the first steps.” ― Paulo Coelho

Debugview.exe as rescue tool

DebugView is a developer friendly tool helps you to monitor debug output messages from local or nw system – from managed/unmanaged code. Recently I was debugging managed COM dll created in C# consumed in office application. I wanted a tool to debug end to end, Let say, your Office files VBA macro calls .NET COM dll for processing some complex logic and then returns the value to your macro.

In dev environment, we usually attach VS to the application and debug them, in VBA using debug.print statements. Assume that, you don’t have VS at your production server or customer machine where you wanted to debug them badly. Here is where debugview comes for rescue.

To write, debug statements from managed code, use Diagnostic having Debug.writeline. For VBA, use OutputDebugString. For other languages – use as here.

C#:- System.Diagnostics.Debug.WriteLine("This is from .NET before word instance.");

VBA:- Private Declare Sub OutputDebugString Lib "kernel32" Alias "OutputDebugStringA" (ByVal lpOutputString As String)
Private Sub DebugPrint(dbgOutput As String)
OutputDebugString dbgOutput
End Sub
Sub test()
DebugPrint ("Test message for the debugger")
End Sub

Note: Make sue you run as “Admin”.

debug1

debug

Advertisements

March 22, 2015 Posted by | .NET General, Office | , , , | Leave a comment

Azure Glossary

A Cloud and Azure Glossary for the Confused
http://www.hanselman.com/blog/ACloudAndAzureGlossaryForTheConfused.aspx

Windows Azure Platform Glossary for IT Pros
http://blogs.technet.com/b/yungchou/archive/2011/04/21/windows-azure-platform-glossary-for-it-pros.aspx

Microsoft Patterns and practices – Azure Glossary
https://msdn.microsoft.com/en-us/library/ff803363.aspx

March 7, 2015 Posted by | Azure | | Leave a comment

Memory explained by Mark Russinovich

Pushing the Limits of Windows: Physical Memory
http://blogs.technet.com/b/markrussinovich/archive/2008/07/21/3092070.aspx

Pushing the Limits of Windows: Virtual Memory
http://blogs.technet.com/b/markrussinovich/archive/2008/11/17/3155406.aspx

Pushing the Limits of Windows: Paged and Nonpaged Pool
http://blogs.technet.com/b/markrussinovich/archive/2009/03/26/3211216.aspx

March 4, 2015 Posted by | .NET General | | Leave a comment

Explored Azure Cloud Service auto scaling feature

This weekend I had a chance to try this blog post by Kirk Evans here. Finally decided to try myself and experience the fact. Trust me, its one of the cool feature implemented in Azure. I can’t imagine how many lines of code would execute in the back-end for each of those button click from portal, say increase the core, queue, cpu etc – really hard to imagine or think about it.

#Hats off to Azure team for their flawless implementation. I was able to experience this feature end to end without any bug or hassle. few observation from my point,

Objective:
========
How to automatically scale the worker role based on the number of messages in a queue

+ Kirk has used Azure service bus to validate this functionality. I have also used the same .NET console application to pump the queue message. It took sometime to fix those project reference etc. Finally with Nuget able to resolve the dependencies and publish it successfully.
+ Everything went flawlessly from there. Spent my time mostly in the portal to know the settings and tweaking it. I think we should bring those nuget console to the project context menu for quicker launch. Right now it is buried some where under main menu of Visual Studio.
+ Though auto scaling worked like charm, the dashboard chart is not getting refreshed or reflecting real data, not sure what’s going on there.

Note: Auto scale feature automatically creates or destroys the VM’s based on the rules

+ Source code uploaded here – http://1drv.ms/1M0I0dS && http://1drv.ms/1M0I51d

+ Screenshots here.

This slideshow requires JavaScript.

Happy weekend !

March 1, 2015 Posted by | Azure, Azure Cloud Service | | Leave a comment

   

%d bloggers like this: