Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

It would be great if some IDE offered the way to right mouse click when a function is called and have the immediate option to jump to the function when it is defined.

Is this possible in Javascript?

Maybe I've just been oblivious - is there a name for this technique?

share|improve this question
The Resharper plugin for Visual Studio has this feature. – Bringer128 Nov 7 '12 at 5:04
If i'm not mistaken this is possible in visual studio when you're debugging a website. It connects to the running IE and correlates the javascript being executed to the source code it served to IE. – Jimmy Hoffa Nov 7 '12 at 5:20
Check out Webstorm. Written by the same guys who made IntelliJ and ReSharper. But yeah, JS is highly mutable so it's best guess without run-time unless something happens to be declared within the same function scope. – Erik Reppen Jun 13 '13 at 15:08

This really is never going to be possible with JavaScript. Some IDE's do a "best guess", but it will never be perfect. Since JavaScript uses a dynamic type system, it is impossible to perform static analysis to determine what a symbol is bound to until runtime.

The closest thing to this would be in-browser debugging tools such as Firebug or chrome's developer tools, which do allow this feature at runtime.

share|improve this answer
Also Firebug allows the user to evaluate a function in the console and clicking on it takes you to the definition. – pllee Nov 8 '12 at 16:52

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.