-
Notifications
You must be signed in to change notification settings - Fork 29
Expand file tree
/
Copy pathrun-interactive-apps.qmd
More file actions
48 lines (30 loc) · 2.38 KB
/
run-interactive-apps.qmd
File metadata and controls
48 lines (30 loc) · 2.38 KB
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
45
46
47
48
---
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.

## Supported app frameworks
Currently, Positron supports the following Python app frameworks:
- [Dash](https://dash.plotly.com/)
- [FastAPI](https://fastapi.tiangolo.com/)
- [Flask](https://flask.palletsprojects.com/en/stable/)
- [Gradio](https://www.gradio.app/)
- [Shiny](https://shiny.posit.co/py/)
- [Streamlit](https://streamlit.io/)
## Running an interactive app
1. Open the `.py` file of a supported app framework.
2. In Editor Actions, click **Play**.

Then, Positron runs the app in a dedicated **Terminal** tab and opens the app URL in the **Viewer** pane.
If your application does not automatically open in the Viewer, check that the settings [`python.terminal.shellIntegration.enabled`](positron://settings/python.terminal.shellIntegration.enabled) and [`terminal.integrated.shellIntegration.enabled`](positron://settings/terminal.integrated.shellIntegration.enabled) are enabled.

To stop the app, select the **Terminal** tab running the application and use the trash can icon to delete the **Terminal** or press <kbd>Ctrl</kbd> + <kbd>C</kbd> to stop the process.
## 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.

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**.

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.
