Tutorial


Debugging Javascript has always been a pain in the neck. The only way to debug Javascript was to use alert boxes everywhere anticipating an error. Or rather let’s put it in this way… it’s just a binary search for an error…!

With new IDEs and plugins coming up it has become very easy. In this article let’s see some the best and easiest methods to debug Javascript.

Debugging Javascript with Visual Studio 2008

With Visual Studio 2008, Microsoft made debugging Javascript very similar to debugging your C# (or VB) code. Here is the process to debug Javascript in VS 2008.

  • Open IE (I tried with IE 6), go to Tools>Internet Options>Advanced
  • Uncheck “Disable Script Debugging (Internet Explorer)” and “Disable Script Debugging (Other)”.

IE Options

  • Open up your page/site which has to be debugged in IE.
  • Go to View>Script Debugger>Open

Select Debugger

  • Select Either New Instance of visual Studio 2008 or an existing instance (Optionally you can select Microsoft Script Editor) and say “Yes”
  • Now Code opens up in VS 2008; set breakpoints on Javascript code as you would do for your C# code.
  • Refresh the page in IE. As soon as the control moves to your breakpoint for Javascript, it breaks to that line.

Now you can debug it as you do for C# code. Best part is you can also verify the local variables with Locals window (Debug>Windows>Locals in VS 2008)

Check ScottGu’s Blog for more

Debugging Javascript with Firefox

I firmly believe that Firefox is a boon for a web developer. It has loads of Ad-ons which make the life of a developer to be as easy as possible. There are many debuggers available for Firefox; of which I found Firebug to be really effective.

Download firebug here.

Once you have firebug up and running, open up the page you want to debug. Click on the firbug icon on the status bar and select the “Script” tab. Initially you will have to enable script debugging so select “Script” check box and click on “Apply Settings for localhost”.

enable script debugging

Now you will be able to see the cod in the Script tab with line numbers. All the lines with valid Javascript will have the line number in bold face and green color. Click on the gray area just behind the line number and that is your break point.

Now you are all set for the debugging session…! So start…!

You can see local variables in the right pane. You can also check the call stack on the right pane by selecting the “Stack” tab.

debug in process

You can use following keyboard shortcuts for debugging:

F8 – Continue

F11 – Step Into

F10 – Step Over

This is the source article which helped me to debug javascript with firebug.

It was a forward email that caught my attention… probably you also might have received it and wondered how on earth this is done…! And you might have thought it would have been better if you also could do it.

What was so interesting about that mail then..? Well it had a JPEG image as attachment whose thumbnail and the actual image were different… strange heh…! And the mail says it is mystery…. break it if you can etc etc….

Sounds interesting…..? Well I will share the secret of that image with you and how to do one for yourself.

A JPEG image stores a lot of details about the image as image header. The header uses a format called EXIF to store the details. Thumbnail of the image is also a part of the EXIF. So if we can manually write this Exif information then we can play with the image as we want… pretty simple rite…!

Download Exifer a small utility and install it and just follow the following steps.

1) Navigare to the folder in which you have the Jpeg image. Select the image you want to modify. If the image has thumbnail data stored then, it will be displayed in the lower rigth panel.

exifer

2) Right click on the thumbnail image in the Exif Thumbnail panel and click on “Insert thumbnail”. Select the image you want the thumbnail to be. You are done.

exifer-1

Now fire it across and create your own mysteries….!

Download this sample Image and observe the thumbnail and original image.

I was just browsing and found this book online…… One of the coolest books on C# fundas….. Enjoy….. :-)

There was a day when computer was attached only to English. But toady we can type in many different languages as we want. Even though this was possible on stand alone computers with corresponding fonts, web was an untouched world…!

Today there are many Ajax based websites which allow us to type in our own language. For example go to Google Kannada which provides a simple way to type in Kannada. The best part is you can type whatever you want in your language and copy paste it throughout the web. Even I copy paste it in gtalk to wonder my friends…!

googlekannada

Now Google Kannada supports fe more indidan languages such as Hindi, Tamil, Telgu and Malayalam. 

You can also try QUILLPAD which is another good website. Quillpad supports more indian languages compared to google kannada.

quillpad

Best part about Quillpad is you can type a message in your language and email it directly. You can also toggle between English and your language… so that your message can contain both the languages.

Earlier we have seen how to delete an existing Gmail account permanently. What if you want to get rid of your unwanted Yahoo or Hotmail account..? Then read on even they provide very simple interface to delete an existing unwanted account permanently.

Deleting Yahoo id permanently.

Click on the link Delete Yahoo! Account and login with the id that you would like to delete. You will be asked to provide following information.

Fill the form and click on Terminate this Account. Your account will be removed in approximately 90 days.

Deleting Hotmail/Windows Live id

Click on Delete Hotmail or Windows Live Account and sign in with the id that you would like to remove. You will land in the following page.

Click on Close Account and you are done. Once you have closed your account, you can reactivate it within 120 days by signing in normally. After 120 days your account will be removed permanently.


Bookmark and Share

Now a day it’s quite common for having Windows and Linux installed on the same machine.

Every time when you boot your PC, the Linux boot loader GRUB (Grand Unified Boot-loader) comes up with the available operating systems that you can boot with.

Now what if you want to completely remove Linux form your system and continue using only Windows..? Simply removing the Linux partition will not solve the problem. Since the GRUB will be installed in the MBR (Master Boot Record) by default, you can not directly boot in to windows.

If you have ever faced this situation or if you want to remove Linux from your system completely then here is how you can do it. Firstly grab your bootable Windows XP CD and boot from it. When it asks for whether you want to go in to Recovery mode, press ‘R’ to enter in to Recovery mode. Enter administrator password and login to the system with Recovery mode. Now enter the following command at the DOS prompt and hit Enter.

C:\fixmbr

Assuming that ‘C:\’ is your Command Prompt. A warning message pops up stating that you are altering the MBR and this may harm the system permanently. Press ‘Y’ to accept.  Now type Exit to quit form the recovery mode.

Now onwards you can directly boot into Windows without the intervention of GRUB.


Bookmark and Share

Do you think you should get rid of that orkut account which is flooded with javascript scraps or unwanted invitations? Or do you want to say a final good bye to orkut…? Then here we go…!

Orkut comes with a very simple way to get rid of that unwanted account. Open the link Delete Orkut Account. Sign-in with your account to be deleted. You will land it to the following page.


Select the checkbox “Yes, I want to permanently remove orkut from my Google account.”, enter your password and click on Remove Orkut. That’s it… Now if you want to sign-in to orkut account again, you will ahve to request your friend to send you an invitation…!


Bookmark and Share

With your mail account flooded with so many mails everyday, don’t you think it is time to get organized? Do you know there is a way to automatically sort all your incoming mails automatically? Seems interesting…?

Well almost all web based mail services offer this facility. Few such as yahoo.com allow you to automatically sort mail to different folders. Where as Gmail has no folders but you can create different labels and all mails that match a criteria will be marked with corresponding label.

Sorting mails automatically in Gmail:

Create a new label by clicking on the Edit Labels on the left side pan. Click on Settings on the top right corner, choose Filters. Click on Create new filer. Now you can filter the mails based on various criteria such as From Address, Subject, has Attachment etc. Click on the Next Step button, and choose the label that you just created. You can also apply some other actions on the incoming mails such as forwarding to particular email automatically or deleting it. Once you have selected necessary options, click on Create Filter button. Do not forget to select the check box next to the button Create Filter.

Sorting Mails automatically in Yahoo

Select Options>Mail Options from top right corner and Choose Filter. Click on the Add button to add a new filter. Enter a name for the filter and select the criteria. Select the appropriate folder to which the mails should be filtered. Click on Add Filter. Yahoo requires you to upgrade to Yahoo! Mil Plus if you want to create more that 15 filters.

Sorting Mails automatically in Hotmail/Windows Live

Select Sorting Mails automatically in Yahoo from the Options on the top right bar. Click on New Filter, Select the appropriate criteria and click on Save.
Out of the above three web based mail service, I felt Hotmail has the simplest way of organizing mails.


Bookmark and Share

Ever wanted to delete an existing Gmail account but had no idea of how to do it? Then here is a way to do it. Google provides a simple way to delete your existing Gmail account. Just point your browser to the following link Delete Account. You will be asked to Sign-in to your account. Sign-in with the account that you want to delete. You will land in following page.

Select the checkbox and enter another e-mail address which you would like to use for obtaining other Google services.  Enter your password and click on “Remove Gmail”. Within two working days your mail box with Gmail will be deleted and all the contents will be permanently erased. Please note that after removal it is impossible to re-activate or recover the mails form the Gmail account.

If you had an unused Gmail account or if you are attacked heavily by spammers and wanted to get rid of the Gmail account then it is high time for you. Go ahead and get rid of it for ever.


Bookmark and Share