Go To Definition for JavaScript Functions in Visual Studio 2011

Visual Studio 2011 has some great changes for CSS, HTML and  JavaScript editor. The changes enables developer to manage and organize code better, do work fast and easily access. In my previous tips I talked about many such new features for Visual Studio 2011. In this post I am going to discuss once nice enhancement of JavaScript Editor in Visual Studio 2011 which is “Go To Definition ( F12) ” for JavaScript functions.

This features is already available from a way long time in C#, VB or other Code editor.  There is nothing to discuss what this options does, yes! it’s just automatically navigate to the method definition. Like other Code Editor, now you can use the same features in Java Script Editor as well.

Now, in new JavaScript editor you will find “Go To Definition” as a context menu option.

image

Select on that menu option or Press “F12” from that calling method,  you will automatically navigate to the method definition.

image

This is really helpful when we are dealing with complex JavaScript Files.

image

JavaScript Go To Definition can navigate to different files as well. If the calling method is defined on some other file “Go To Definition” will automatically navigation to that JS File itself ( Similar to  other code editors)

image

Yes, now navigation with JavaScript files very easy and specially when searching methods with in a complex JQuery files.

image

Hope this helps !

Cheers !

Abhijit

Abhijit Jana

Abhijit runs the Daily .NET Tips. He started this site with a vision to have a single knowledge base of .NET tips and tricks and share post that can quickly help any developers . He is a Former Microsoft ASP.NET MVP, CodeProject MVP, Mentor, Speaker, Author, Technology Evangelist and presently working as a .NET Consultant. He blogs at http://abhijitjana.net , you can follow him @AbhijitJana . He is the author of book Kinect for Windows SDK Programming Guide.