-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathrun-interactive-apps.qmd
44 lines (28 loc) · 1.68 KB
/
run-interactive-apps.qmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
---
title: "Run Interactive Apps"
---
Positron provides a simplified method for running interactive apps via the **Play** button. Instead of running an app from a **Terminal**, you can run supported apps by clicking the **Play** button in Editor Actions. Additionally, you can start a supported app in debug mode through the **Play** button context menu.
![Positron Run App button in Editor Actions](images/run-app-button.png)
## Supported app frameworks
Currently, Positron supports the following Python app frameworks:
- Dash
- FastAPI
- Flask
- Gradio
- Shiny
- Streamlit
## Running an interactive app
1. Open the `.py` file of a supported app framework.
2. In Editor Actions, click **Play**.
![Positron Run App Play button](images/run-app-play-button.png)
Then, Positron runs the app in a dedicated **Terminal** tab and opens the app URL in the **Viewer** pane.
![A Streamlit app in the Positron Viewer](images/run-app-streamlit.png)
## Debugging an interactive app
1. Open the `.py` file of a supported app framework.
2. Set breakpoints in the `.py` file by clicking on the editor margin.
![Editor margin area for adding breakpoints](images/run-app-debug-breakpoint.png)
3. Click the **Play** button drop-down context menu and select **Debug [*{SUPPORTED_APP_TYPE}*] App in Terminal**.
- For this example, we select **Debug Steamlit App in Terminal**.
![Play button drop-down context menu](images/run-app-debug-streamlit.png)
Then, Positron runs the app in a dedicated **Terminal** tab, opens the app URL in the **Viewer** pane, and starts the app in debug mode.
![A Streamlit app running in debug mode; paused at a breakpoint](images/run-app-debug-streamlit-paused-at-breakpoint.png)