Boost Your Productivity with AL/BC – Breadcrumbs

Boost Your Productivity with AL/BC – Breadcrumbs

This post is part of the blog post series “Boost Your Productivity with AL and Business Central”. If you want to know more about what this series is about and why I created it, you can checkout this post.

Today we will deal with the breadcrumbs in Visual Studio Code.

What Are These Breadcrumbs?

Breadcrumbs in Visual Studio allow us to navigate to our symbols or files in a fast way. Pictures speak more than a thousand words, so let’s take a look at an example. For this I created the table “MyTable”.

When I open the AL file, I see a navigation bar above the code – these are our breadcrumbs.

Please note that they change depending on the cursor position. In the screenshot above, our cursor is on the first line – therefore we see “Table 50100 MyTable” as the last element.

If we place the cursor under line 7 – Fields, the breadcrumbs expand:

If we put it at the bottom of the line of the first global variable (24) instead, our breadcrumbs look like this:

So much for the general understanding. Depending on where we are in our file, the breadcrumbs change accordingly.

Use Breadcrumbs To Navigate Through Your File Like a Boss

We are programmers. If you’re even a little bit like me, you don’t like to click the mouse anywhere. That takes time and requires fine motor skills. So I’ll tell you a fantastic information: You can activate the breadcrumbs with the shortcut “Ctrl + Shift + .

In general the following shortcuts are available for the breadcrumbs.

With the breadcrumbs you can not only see what is included in a file, but you can also search in it. This makes them a powerful tool in programming. Let’s examine this with an example.

Examples Where Using Breadcrumbs Is Useful

In the next example I have created a copy of the standard sales invoice. We are in the layout of the opened .al file.

Navigating to the Request Page

For our customization we would like to add a new option in the request page. Instead of scrolling through the large file, we simply use the breadcrumbs.

We place the cursor in the first line of the file, press “CTRL” + “SHIFT” + “. As a result the breadcrumbs open.

An additional click on “SPACE” will expand the breadcrumbs. We see that the “requestpage” is two entries below the report.

Now, if we use the down arrow key twice, we are already at the right place to look at the request page. There we can insert our new option. Pretty fast, isn’t it?

Finding Procedures Like a Boss

Well, let’s look at another example. We are interested in the function responsible for calculating the sums. From experience we know that it contains the word “total” in the function name. Thus we open the breadcrumbs again and search for “total”.

By using DownArrow we can jump through the results. The first result is the function "procedure InitializeRequest(NewLogInteraction: Boolean; DisplayAsmInfo: Boolean)".

Did Visual Studio Code have one beer too many yesterday? Not at all. It doesn’t look at the search to see if the word “total” spelled together is present in any of the entries. Instead, it finds “fragmented” results as long as the individual letters of the word are generally included. In our case it is the letters marked in bold:

procedure InitializeRequest(NewLogInteraction: Boolean; DisplayAsmInfo: Boolean)

Looking at the second result, we are more in the right place. That also worked pretty fast.

Using the breadcrumbs search can be very useful if you are searching for function names, for example. With the normal search you would get much more results, because all variables would be found as well.

For additional information you can checkout this this article .

Have a nice week.


  • 💬 Waldemar Brakowski

Leave a Reply

Your email address will not be published. Required fields are marked *