Share this page

# Scripting with Visual Studio

This topic describes how to build and run DevWeb scripts using the Microsoft Visual Studio IDE.

In this topic:

## Create external tools

When scripting with Visual Studio, you can create external tools that contain tasks to run DevWeb scripts. You need only do this once, and then you can use the tools for all your DevWeb scripts.

The following example describes how to create two external tools:

- DevWeb Single Run
- DevWeb Load
- DevWeb Debug

To create an external tool to run DevWeb scripts:

1. In Visual Studio, select Tools > External Tools.
2. In the displayed External Tools dialog box, click Add.
3. Fill in the dialog box fields for each tool you create, as appropriate, using the tables below.
4. Select the check box for Use Output window.

5. Click OK.

6. After creating the external tool, it should be available to run from the Tools menu.

## Field values to create the tools

Single Run

Field name | Value
--- | ---
Title | DevWeb Single Run
Command | %DEVWEB_PATH%/DevWeb.exe (if you do not have the DEVWEB_PATH environment variable defined, use the full path)
Arguments | -ide=vs $(ProjectDir)
Initial directory | $(ProjectDir)

Load

Field name | Value
--- | ---
Title | DevWeb Load
Command | %DEVWEB_PATH%/DevWeb.exe (if you do not have the DEVWEB_PATH environment variable defined, use the full path)
Arguments | -mode=load -ide=vs $(ProjectDir)
Initial directory | $(ProjectDir)

Debug

Field name | Value
--- | ---
Title | DevWeb Debug
Command | %DEVWEB_PATH%/DevWeb.exe (if you do not have the DEVWEB_PATH environment variable defined, use the full path)
Arguments | -inspect -ide=vs $(ProjectDir)
Initial directory | $(ProjectDir)

## Debug DevWeb projects

You can use the following process to debug your project in the Visual Studio IDE.

Tip: You need to repeat the process every time you want to debug, which can be inconvenient. We recommend using Visual Studio Code to debug instead - see Create DevWeb scripts in VS Code.

To debug a DevWeb project:

1. Create a DevWeb Debug external tool, as described above.
2. With the project selected, run Tools > DevWeb Debug. DevWeb starts, but the test will not run.
3. In the main menu, click Debug > Attach to Process. The Attach to Process dialog box is displayed.
4. In the Connection type field, select WebKit websocket (no authentication).
5. In the Connection target field, type http://localhost:9230 (note that the host and port are configurable from the config.yml file, jsInspector section).
6. Press ENTER on the keyboard. The correct process should be displayed in the Process area.
7. In the Attach to field, enter WebKit code.

8. Select the correct process and click Attach.

## See also

- Scripting with your IDE
- Scale tests from your IDE
- Run scripts

https://admhelp.microfocus.com Performance Engineering for Developers 8942
Tips to improve your search results... OpenText™ Performance Engineering for Developers Help Center OpenText™ Performance Engineering for Developers Help 26.1-26.3 All View Local Help Center View Online Help Center Version: