From the course: Visual Studio Code Productivity Tips

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Use Go to and Peek Definition to find code references

Use Go to and Peek Definition to find code references - Visual Studio Code Tutorial

From the course: Visual Studio Code Productivity Tips

Start my 1-month free trial

Use Go to and Peek Definition to find code references

- [Instructor] When you are programming or scripting, oftentimes you'll run into variables or functions that are unfamiliar. Like I'm in this tour.js file and I'm not sure what's happening here on line six with this new tour guide. Having a way to explore the code definition or the code itself is valuable and VS code has several ways to look at code definitions. I'll start by looking at go to definitions. I'll right click here, and choose go to definition. Now this menu is available for all the code editors. I'm using JavaScript, but you can use this same feature for TypeScript and C# and some of the other languages. The other thing I'd like to point out is I'm on a PC and the keystroke is F12. If you're on a different operating system it's probably different. And you might also have different key shortcuts configured for your copy of Visual Studio Code. So it might not be exactly the same as this. But on my PC it's F12. So start by clicking on go to definition. And you'll see that it…

Contents