Skip to Content
Author's profile photo Stefan Schnell

SAP GUI Scripting: Visual Studio Code Editor

Visual Studio Code is a platform independent free and open source code editor from Microsoft. It supports a lot of languages with a rich set of features. You can find VS Code here resp. you can download it from here. It is possible to download a zip file and after you unpack them, so you can use VS Code without any installation procedure.

Here an example with a SAP GUI Script code in PowerShell

It is possible to extend VS Code via plug-ins, you can find the extensions at the marketplace here. On this way you can install the support of PowerShell scripting language, you can find the extension here, if you want to install it offline, or you can install it direct from the extension bar.

After this steps it is possible to use VS Code in the context of SAP GUI Scripting. The image below shows  a few recorded SAP GUI for Windows activities with Scripting Tracker. The source is opened in the external editor, in this case is VS Code configured.

Now you can e.g. easily use the debug functionality with the variable view and you can enjoy the new extended possibilties.

Assigned Tags

      You must be Logged on to comment or reply to a post.
      Author's profile photo Christian Guenter
      Christian Guenter

      Hi Stefan,


      I really appreciate your efforts around SAP Gui Scripting and I gain very much from your tools. Many thanks for that.

      When I invoke a script within VS Code or Powershell I get the following error.

      Do you have a hint for me what the problem is?

      Thank you.

      Regards Christian

      Author's profile photo Stefan Schnell
      Stefan Schnell
      Blog Post Author

      Hello Christian,

      thanks for your reply and the kindful words.

      Sure, you need an include file, called COM.ps1, which contains a few functions to use COM easily. You can find it here. Scroll a little bit down and before the image you can find the source.

      Let us know your result.


      Author's profile photo Christian Guenter
      Christian Guenter

      Hi Stefan,

      great. Thank you very much. It works like a charm now.

      Regards Christian

      Author's profile photo Junior Alexander Hidalgo Socola
      Junior Alexander Hidalgo Socola

      @Stefan Schnell buenos dias,

      como podria tener la conexion desde visual studio a SAP GUI, por conexion Script


      parecido a lo que haces con powershell y SAP GUI