My Debugger Now Talks to VS Code

By Rich Nass

Executive Vice President

Embedded Computing Design

June 20, 2022

Blog

My Debugger Now Talks to VS Code

I’m a Visual Studio Code (VS Code) user. If you’re not familiar with VS Code, it’s a source-code editor from Microsoft that is intended for systems based on Windows or Linux. It’s mostly used for debugging, but has lots of other great features. Oh, did I mention that it’s open source, aka free? Yup, the price is right.

At the same time, I use a tool that’s pretty much the industry standard to handle the complete code-development process. That would be IAR System’s Embedded Workbench. Embedded Workbench has been around for more than three decades. It encompasses the entire toolchain for embedded software development with its own integrated development environment (IDE). That means it includes a compiler, an assembler, a linker, and a debugger.

Now the news, which is a biggie for me, and anyone in the same boat as me, IAR has released VS Code extensions, which means that developers can now work in VS Code, while at the same time taking advantage of the capabilities of Embedded Workbench. This new debugger integration includes the ability to view all Azure RTOS ThreadX objects, set thread-specific breakpoints, view suspended thread’s call stacks, and view the unique execution profile and performance monitoring features in Azure RTOS ThreadX. Extensions are nothing new to the IAR team. The company has offered extensions to the Eclipse IDE for quite some time.

VS Code Represents a Large Pool

I’ve heard different numbers thrown around about how many VS Code users there are, with the high mark at around 14 million. If you look at how many of those are in the embedded space, a wild guess puts the number somewhere between 700,000 and a million. Many claim that VS Code appeals to the younger set of developers. Many of those developers are working with Linux, and that’s a boon to both the developers and IAR, who now gain access to a new set of developers. In addition, by extension—pun intended—developers gain access to the Secure Thingz security toolset. Secure Thingz is a subsidiary of IAR, and the two companies’ products are now tightly intertwined.

An important factor for extensions like these, which are now available at the Visual Studio Code Marketplace, is that developers today operate different than in the past. They work on many things simultaneously, not just focusing on embedded, switching in and out of different tasks, programming some in C/C++ in the morning, switching to Python in the afternoon, and so on.

Staying In the Environment of Choice

With all that said, these developers don’t want to be switching between interfaces and editors when they employ different tool sets, and that’s what these extensions enable. While VS Code is not an IDE (an integrated development environment), it is a rich enough environment to handle all of these common tasks. According to IAR Systems, “This is a way for us to remove some of the hassle that our users sometimes go through and help them streamline their workflows.”

From my perspective, it seemed like a no-brainer for IAR. You know the phrase: If you can’t bring Mohamed to the mountain, bring the mountain to Mohamed. In this case, the “mountain” is VS Code and “Mohamed” is the developer.

Thankfully, the two companies, Microsoft and IAR, came together to make the transition process easy for users with a tight integration, which took about a year from idea to final delivery. IAR could have done it all on its own (because it’s open source), but obviously having the buy-in from Microsoft made the project flow much easier.

Finding the Extensions

If you’re in VS Code, you can search for the extensions. There are actually two of them, a build extension and an extension for C-SPY, IAR’s debugging tool. That latter extension also gives access to the debugging probes. Once you install the extensions, they will detect which tools are installed on your system, including versions for Arm and RISC-V. From that point, you can manage your files and build your project, or even make use of the IAR static-analysis tool.

Because this is all done in open source, users can contribute directly to the extensions if they find them lacking or if there is some specific area they want to address. Note this is the first time IAR has ventured this deep into the open-source pool. Like VS Code itself, the extensions are available on GitHub, which is a great resource for the embedded developer.

Richard Nass’ key responsibilities include setting the direction for all aspects of OSM’s ECD portfolio, including digital, print, and live events. Previously, Nass was the Brand Director for Design News. Prior, he led the content team for UBM’s Medical Devices Group, and all custom properties and events. Nass has been in the engineering OEM industry for more than 30 years. In prior stints, he led the Content Team at EE Times, Embedded.com, and TechOnLine. Nass holds a BSEE degree from NJIT.

More from Rich