Debugging FastAPI in VSCode Is Easier Than You Think

  Рет қаралды 9,485

ArjanCodes

ArjanCodes

Күн бұрын

Пікірлер: 39
@ArjanCodes
@ArjanCodes 15 сағат бұрын
💡 Learn how to design great software in 7 steps: arjan.codes/designguide.
@maviecestbon
@maviecestbon 2 күн бұрын
I usually use the debug terminal instead of watch statements. The expressions I want to watch are usually to complex to fit into the watch section so setting a breakpoint and running the statement in the debug terminal is shorter. In general having access to a complete python REPL in the debug terminal is such a powerful feature :)
@chrisgeishauser
@chrisgeishauser 3 күн бұрын
Not only a great tutorial about debugging FastAPI, but about debugging in general! I learned a lot, thanks!
@ArjanCodes
@ArjanCodes 7 сағат бұрын
Glad it was helpful!
@jschwindt
@jschwindt 2 күн бұрын
I also find very useful to use the debug console. After I reaching a breakpoint you can try expressions or inspect/call object methods directly in the debug console.
@magnus9999
@magnus9999 Күн бұрын
After I have found the breakpoint() function it's been wonderful to stop the code and try different things to understand some unusual behaviour. But This video has great tips for debugger. Thanks.
@souravbanerjee309
@souravbanerjee309 3 күн бұрын
Please make a playlist about what to do and not to do in production-grade API building.
@demolazer
@demolazer 2 күн бұрын
Perfect timing, how did you know? Literally doing this right now.
@kevinrosa
@kevinrosa 2 күн бұрын
Same!
@Necas209
@Necas209 3 күн бұрын
Just a heads up: you should probably disable automatic title translation for both regular videos and shorts. This video, for example, shows up as “01 03 DEBUG FASTAPI” on my country (Portugal). The same has been happening to your shorts. This title is mostly gibberish and sounds like a placeholder for the actual title English speakers must be seeing.
@Daviid_5
@Daviid_5 3 күн бұрын
01 03 2025 DEPURACIÓN FASTAPI in Spanish
@tjanos88
@tjanos88 3 күн бұрын
Yes, please.
@ArjanCodes
@ArjanCodes 3 күн бұрын
Thanks for pointing that out! KZbin has done quite a few changes lately related to languages. We’ll look into it.
@tedlazar
@tedlazar 2 күн бұрын
Happy New Year dear Arjan, with many great videos like 2024 !!!
@ArjanCodes
@ArjanCodes 11 сағат бұрын
Happy new year!
@tswdev
@tswdev 2 күн бұрын
Conditional breakpoints are super useful. I use them in Pycharm a lot. I didnt know about all those extra breakpoint types though, I dont think Pycharm has them. The break only on x number of hits, or "wait for other breakpoint" functionality. Seems really useful.
@rangabharath4253
@rangabharath4253 3 күн бұрын
Awesome as always 🙂
@ChaseAdams-s7o
@ChaseAdams-s7o 3 күн бұрын
So excited for this video! THANK YOU! Watching now
@difegam3
@difegam3 2 күн бұрын
Happy New Year / gelukkig nieuwjaar 🎉 and thank you for the great video! I would like to suggest the VS Code extension REST Client. It’s great for sending GET/POST requests and presenting the qry and response in a clear format.
@jaivenkatesh1647
@jaivenkatesh1647 3 күн бұрын
Iam looking for this video all over youtube thanks for this video
@ArjanCodes
@ArjanCodes 7 сағат бұрын
Most welcome 😊
@MrVernuk
@MrVernuk Сағат бұрын
I use debugger not often, but it's really helpfull for me to dive deeper inside the object structure for example, which I met throughout debugging process. This helps to find some interesting things related to the object structure etc. However as far as I know and heard, not many developers actully used debugger in their developing process. They argue this by saying that their code no complex and they fully understands what the code should do. I partially agree with them, but sometimes it's hard to understand where is an error is occurred in the code. Arjan, what is your thoughts on this? How often you use (used) debugging in your developing routine? 🙂
@zion4d
@zion4d Күн бұрын
Very nice, but if app dockerized it tries to connect DB in neighbor pgadmin container and fails because cant connect. Same issue with Redis. To fix have to change db connection address in settings. And change back before git push to VPS
@zion4d
@zion4d 15 сағат бұрын
Solved adding .envdev with DB settings and adding envFile:.envdev to launch.json. Of course dont forget about docker ports mapping on db and redis containers.
@kapustinalexander848
@kapustinalexander848 3 күн бұрын
This is a dap protocol, and you can use this monster in any editors. Vim or emacs can do the same things.
@inspiredbyrd
@inspiredbyrd 3 күн бұрын
Thank you for again an interesting video. Can you please review a relative new kid on the block called FastHtml, which seems a hybrid between FastApi and HTMX. I would like to hear your opinion on this.
@joschomo1010
@joschomo1010 3 күн бұрын
How show nvim
@serenditymuse
@serenditymuse 3 күн бұрын
Easier to write unit test that directly call your FastAPI endpoints with a temporary db or other store under it. Also you can call endpoints directly as functions for some types of testing. I don't see why you want to debug under uvicorn if you goal is debugging your fastapi logic itself. Are you trying to debug uvicorn somehow?
@matis9783
@matis9783 3 күн бұрын
you have old FastAPI logo in thumbnail
@frydegz
@frydegz 3 күн бұрын
thumbnail is crazy
@Soltaiyou
@Soltaiyou 3 күн бұрын
Total click bait! Where was the nerf gun?!?!?!
@ArjanCodes
@ArjanCodes 3 күн бұрын
It was off-camera and pointed at me to make sure I didn’t ramble too much during recording.
@sborkes
@sborkes 3 күн бұрын
Nice video title 😂
@aflous
@aflous 3 күн бұрын
You meant thumbnail?
@ArjanCodes
@ArjanCodes 3 күн бұрын
Thanks 😅
@Daviid_5
@Daviid_5 3 күн бұрын
​@@aflous Nah, he's probably seeing the automated translation, same problem with shorts
@tswdev
@tswdev 2 күн бұрын
@@Daviid_5 No, I saw it originally as a placeholder title, probably the name of the file without the extension. Arjan then edited it.
Tugas 14
57:33
Fadly maulana iksan
Рет қаралды
Presentation on Relvy AI at Turing AGI Icons
4:22
Relvy AI
Рет қаралды 339
-5+3은 뭔가요? 📚 #shorts
0:19
5 분 Tricks
Рет қаралды 13 МЛН
$1 vs $500,000 Plane Ticket!
12:20
MrBeast
Рет қаралды 122 МЛН
Who is More Stupid? #tiktok #sigmagirl #funny
0:27
CRAZY GREAPA
Рет қаралды 10 МЛН
Avoid These BAD Practices in Python OOP
24:42
ArjanCodes
Рет қаралды 82 М.
Copilot is so desperate, they made it free
28:31
Theo - t3․gg
Рет қаралды 70 М.
The Most Important Skill You Never Learned
34:56
Web Dev Simplified
Рет қаралды 224 М.
7 Design Patterns EVERY Developer Should Know
23:09
ForrestKnight
Рет қаралды 184 М.
COMPLETE No-Nonsense VSCode Setup for Python Devs
26:05
ArjanCodes
Рет қаралды 52 М.
Intro to the Zig Programming Language • Andrew Kelley • GOTO 2022
50:14
Why You Should Think Twice Before Using Returns in Python
21:27
ArjanCodes
Рет қаралды 50 М.
Refactoring a Python Data Validation Interactive Shell
45:55
ArjanCodes
Рет қаралды 14 М.
-5+3은 뭔가요? 📚 #shorts
0:19
5 분 Tricks
Рет қаралды 13 МЛН