Split FastAPI debug config into file-scoped and project-scoped options
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Anfängerfreundlichkeit
- 48/100
- Issue-Typ
- Feature
- Klarheit
- Größtenteils klar
- Aktivitätsstatus
- Ruhig
- Tech-Stack
- fastapi, python, typescript
Rechercherichtung
Beginne damit, die aktuellen FastAPI-Debug-Konfigurationen und den im Issue beschriebenen dynamischen Provider sowie die referenzierten Änderungen an vscode-python zu prüfen. Vergleiche deren Erkennung von uvicorn und main.py mit der Datei- und Projekterkennung der fastapi CLI über pyproject.toml. Erledigt ist die Aufgabe, wenn die Debugging-Erfahrung mithilfe der CLI klar getrennte Optionen für die aktuelle Datei und den Projektbereich bietet.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
Hey folks 👋 I work at @fastapilabs and maintain https://github.com/fastapi/fastapi-vscode. I've been looking at the broader FastAPI experience in VS Code and wanted to open an issue to discuss an improvement we've been discussing related to debugging.
The current FastAPI debug configurations (the snippet from microsoft/vscode-python#14606 and the dynamic provider added in #19505) launch the app via uvicorn ...:app --reload and rely on hand-rolled main.py detection. This predates the fastapi CLI (fastapi run / fastapi dev), which provides built-in app discovery via pyproject.toml or default file locations.
For an improved experience, I'd like to propose splitting the current debugging experience into two options:
-
Debug FastAPI with current file - runs
fastapi run ${file}against the currently active file. This is optimal for single-file apps or quickly debugging a specific entry point. -
Debug FastAPI - runs plain
fastapi runand lets the CLI discover the app viapyproject.tomlor default file locations. Doing this would also remove the extension's own detection logic in favor of the FastAPI CLI's resolution, and give users a clearer choice between file-scoped and project-scoped debugging.
Wanted to gauge whether there'd be appetite for this change. I already have a branch with most of this working locally and would be happy to put up a PR if it makes sense.
Thanks!
- Vorherrschende Sprache
- TypeScript
- Sterne
- 181
- Forks
- 126
- Ø Merge
- 8 Std. 49 Min.
- Gemergte PRs (30 T.)
- 1
Beitragsleitfaden
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus microsoft/vscode-python-debugger
-
triage-needed
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
microsoft/vscode-python-debugger#1110 ·
-
triage-needed
Schwierigkeit 1/5 1-3 Stunden Anfängerfreundlichkeit 88/100
microsoft/vscode-python-debugger#1024 · 1 Kommentar ·
-
triage-needed
microsoft/vscode-python-debugger#1111 · 1 Reaktion · 1 zugewiesene Person ·
-
triage-needed
microsoft/vscode-python-debugger#1104 · 1 Reaktion · 1 zugewiesene Person ·
-
triage-needed
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 58/100
microsoft/vscode-python-debugger#1095 · 1 Kommentar · 1 Reaktion ·
Alle Issues in microsoft/vscode-python-debugger
Ähnliche Issues
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 84/100
bcgov/bc-wallet-mobile#4761 · 1 Kommentar ·
-
external-issue to-triage
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 88/100
-
area-deployment area-integrations triage:bot-seen
Schwierigkeit 2/5 Ein halber Tag Anfängerfreundlichkeit 86/100
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 82/100
-
refactor
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 84/100