Solutions
Markets
References
Services
Company
AL debugging with VS Live Share

AL debugging with VS Live Share

30. May 2018

AL debugging with VS Live Share

Visual Studio Code is one of the hottest code editors / IDEs on the market and if you’ve been following this blog, you know that I am one of the biggest fans. A new feature that really makes it stand out from the crowd (together with “traditional” Visual Studio, where this also works) is VS Live Share and since today, it also support AL debugging sessions!

The TL;DR

VS Live Share allows you to share your development workspace (files, resources, etc), your current debug session and even locally running (web) applications with other developers. This allows very easy co- or pair programming, helping each other and reviewing code. The main benefits compared with screen sharing is that it uses way less bandwidth and is (supposed to be) more stable1. You can keep working in your own environment with your own preferred settings, theme etc., but see the other person’s workspace and files and go through them independently. You can even see breakpoints, variable values and so on. This should and will help people working in distributed teams a lot but even if it is only across the room, this way of sharing your dev environment is definitely worth a try

A bit of background and a small demo

After I saw the demos for VS Live Share, I immediately wanted to try it, but it was a closed private preview. At the MVP Summit this year2 I had the chance to join a session on this topic and got in contact with Jon Chu, one of the people working on Live Share. He kindly gave me access to the private preview and I could play around with it. I quickly found out that I absolutely loved it, but it didn’t work with AL debugging sessions. In fact, AL debugging completely stopped working when the extension was installed. While that wasn’t ideal, I really found very good support after filing an issue on the corresponding GitHub repo. Currently it works for me in a simple project but in our somewhat more complex extension it doesn’t yet. Microsoft is looking into it and I am confident that they will figure that one out as well. However, go ahead and try with your projects, maybe it is something specific within our extension code and it works for you.

Because really, the full wow effect hits you as soon as you try it yourself. I’ll end it with a very small demo: On the left you see the “host” who has all the files and wants to share his workspace with the “guest” on the left. As you can see, I have an English VS Code instance with a light theme on the left and a German one with a dark theme on the right. And you can also see how I can independently look at files, set breakpoints, check variable values and so on. Another nice feature is the ability to ask participants to go to the same place (“focus participant”) or to join the participant where he is (“follow participant”).

If you happen to also run into the same problem with AL debugging, then you will get an error message "Error: An internal error has occured". In that case set the liveshare.excludedDebugTypes setting to ["al"] and you should be good to go again3. Thanks to Jonathan Carter for letting me know, making AL debugging work and of course for his and his colleague’s amazing work on Live Share!

  1. my quite limited tests with VS Live Share support that, but I need a bit more experience with it to really state that with more confidence
  2. by the way, a really amazing event. If you ever considered or tried to become an MVP, this event alone is worth it
  3. but obviously you can’t share your debugging session anymore, only your workspace