DIAdem Help

External Debugging of VBS Scripts with Visual Studio

  • Updated2024-09-12
  • 1 minute(s) read

External Debugging of VBS Scripts with Visual Studio

Use an external debugger to work through VBS scripts step by step and to search for errors. Complete the following steps to install Visual Studio code on your machine and set it up for debugging Python scripts:

Installing and Configuring Visual Studio

  1. Download the Visual Studio Community installer or another version of Visual Studio from the Internet, run the installer, and follow the instructions in the installer.
  2. During installation, the installer prompts you to customize your user experience. Select the Individual components tab and enable the following components:
    • JavaScript and TypeScript language support
    • Just-In-Time debugger

Debugging VBS Scripts in Visual Studio

  1. Switch to DIAdem SCRIPT.
  2. Open or create a VBS file.
  3. Click Use External Debugger on the toolbar.
  4. Select a line and click Insert Breakpoint F9 on the command bar. DIAdem inserts the text Stop.
  5. Click Run Script + F5 on the toolbar.
  6. As soon as the script executes the Stop command, the Choose Just-In-Time Debugger dialog box opens, displaying the list of available debuggers. Select the Visual Studio version you have installed and click OK.
  7. Visual Studio opens in debug mode. You can set breakpoints, process the script step-by-step, and use other debugging functions.
  8. In Visual Studio click Stop Debugging (Shift + F5) after debugging to disconnect the debugger from the DIAdem-Python environment.

Log in to get a better experience