-
Notifications
You must be signed in to change notification settings - Fork 8
Functionality
Before you start testing the functionality of the extension, please index source code.
You can check your workspace configuration with command:
> EDK2: Workspace configuration (UI)
This configuration will be automatically populated after you indexed your source code.
-
DSC relative path Are the main
DSCfiles for your workspace - Build Defines Build defines that were injected in your EDK2 build command
- Package paths are the paths set for the EDK2 Build command.
You can manually change this configuration. After any manual modification the user will be prompted to rescan the Index.
When you open a file in the editor, you will see in the status bar a warning if the file you are looking has been compiled or not:

The following commands are expected to work only on files that have been used in compilation.
This commands are only accessible using the command palette (⌨F1)
Will show a list of all the libraries compiled.

Will show a list of all the modules compiled.
This will clean up the current source index and will create a new one. See.
This will use the previous index configuration and will recreate the index without changing the workspace settings
After you source code has been indexed you will see some of the features of using Edk2Code extension
⚠ IMPORTANT Before continuing please index your code following this instructions


Right click on a source file name and then select Go To Definition (F12)

This will open the source file selected. This also works for LibraryClasses, Pcd and Packages:

The results shown are based on your DSC parsing.
Start typing on the LibraryClasses section will show suggestions of libraries that can be included in that INF file:

This suggestions are based on DEC files in Packages section.
Right click on an anywhere in an INF file and select EDK2: Goto DSC Declaration

This will open the DSC file where this INF file was declared.
If the INF file is a library, right click and select EDK2: Show Library usage:

This will show what modules are using your library:

DSC files will dim source that hasn't been compiled based on DEFINES. You can see the value of the defines if you hover your mouse over.
This also works with PCD values

Right click on a file path and select Go to Definition (F12) to open that file.
Right click and select Go to DSC Inclusion to see if this DSC file was included (!Include) in other DSC file.
Right on a function name and select Show Call Hierarchy:

This will open the References view with the call Hierarchy of the selected function. Edk2Code extension will filter unused calls from the view.

When you are on a C file, Right click and select Go to INF:

This will open the .inf file that compiled that C file.
Right click on a C symbol (function, variable, etc) and select EDK2: Go To Definition to open the symbol definition. This differs from regular Go to Definition command provided by VSCODE as this will uses CSCOPE and compiled files to query the definitions. Sometimes it gives better results.
Hover on keywords of your ASL code and you will see help extracted from ACPI specification (6.3)

Start typing anywhere in your *.asl files and you will see autocomplete suggestions of ASL specification.
