Version: Latest

Troubleshooting the Rasa Action Server with VS Code

You can use Visual Studio Code to debug the Rasa Action Server using the Microsoft Python Debugger Extension.

How to configure VS Code

Install the Python Debugger Extension in Visual Studio and create a file named .vscode/launch.json. Add the configuration block shown here to run the action server within VS Code.

note

This configuration will work if you're action server connection is done via the default http REST interface or via the grpc interface. If you are running the action code as a module you will need to configure the launch.json to start the Rasa server instead of the action server.

If you're using a virtual environment, make sure you've set your VS Code python interpreter to the correct environment.

{
"version": "0.2.0",
"configurations": [
{
"name": "action server",
"type": "debugpy",
"request": "launch",
"module": "rasa",
"args": [
"run",
"actions",
"--debug"
]
}
]
}

How to start troubleshooting

With the launch.json configured, start your action server from VS Code by choosing the Run and Debug on the left icon bar and then choose the Run action server at the top. You'll see the action server messages in the debug console window and can set breakpoints in your actions.

VS Code Debugging