there is nothing different when debugging FastAPI or Django app, even Flutter app for that matter. But VSCode will help you create the debugging setup.
I've coded with VSCode for years now but never known how to use the debugger! Looks really powerful and I guess it forces you to code a little more carefully as well Gonna try to incorporate it in my dev workflow soon and see what difference it makes! Thanks Arjan
Great ... enabled me to add several new tips to my own hard learned uses so far. VS Code formerly had a great "Preview" extension that visualized the call stack and allowed stepwise execution and display of function calls, returns, etc. I found that to also be a great assist in debugging as well.
One thing missing that I find myself using a lot is the debugger console. Any time I'm unsure of how exactly to do something I use a breakpoint, run my ideas at that point through the debugger console to see what works, and implement it in code.
great video! I also frequently use the tebugging terminal (Ctrl+Shift+Y), where you can calculate expressions (similar to the watch section), but can also create and manipulate variables etc. the debugger also works great with pytest
How did you get the Python Debug Console in the editor pane? I love to open terminals in the editor area, but I haven't managed this for the Debug Console.
How can I debug a file that I have to run from the command line? If it has imports from another folder, so I need to start it above the file directory.
I'd like to use VSCode to attach to (and debug) running web services, written in python, which run in a container (docker or kubernetes) in the cloud somewhere (azure, aws), but it is unclear to me how to go about that.
Great video! I think that it would have been useful to cover the debug console and also VS Code's testing pane where you can collect tests and then debug individual tests. It may have also been worth mentioning that you can Debug cells in the built-in Jupyter notebooks too - but these would be good topics for a follow up!
Great video. Could you do a basic vs code debugging session with pytest and pytest-bdd with scenarios please? I always run into a list index error with pytest-bdd when trying to debug a scenario that works in the terminal.
Why using debugging for module instead of normal file? is there really a big advantages? and can we have a video with 3-4 different debuggers and when/why to use?
I have a feeling it's something to do with Copilot, like a suggestion feature or something. I don't think it's relevant to the topic so I wouldn't worry for now.
I hope you talk about more request type in launch.json (attach, launch, remote debugging,....) and some advance topic like debug threading, asyncio debug, .... What you sharing in the video is simple, or just for beginer.
Using this is great, but I would love to see a video that explains how to debug async code, monitor threads, maybe processes etc. Thanks Arjan for your videos. When I will be rich I will join the paid channel !
I worked closely with Spark scripts, so I'm kinda sad that VSCode features like breakpoints and such can't really be used for example checking dataframes...
Thanks for this! But what I have never managed to get working is debugging code running in a container (using Docker/Podman etc.). A demonstration of the setup for this would be very much appreciated (assuming you can figure it out!).
Thanks man that was very clear. I wondered if there is a feature like in the IDE I've been using (Spyder) where you can tinker with the variable once you've hit the breakpoint and the program is on pause. I've been finding this very useful when I'm not really sure about the correct function to use to process dataframes...
Can you please make a video about debugging a multi-file package under development? Always confused how to structure file directories & import statements to work both during debugging and after distribution.
debugging a Flask application would also be incredibly useful. A problem with most RUclips debugging videos is that they show how to work on simple scripts, but debugging an app running on a framework is way more complicated 😅
@ArjanCodes A video on how to set up for debugging AMD modules using node would be amazing. I cannot get it to work. I think node uses commonJS and does not understand AMD modules so I get a ReferenceError: define is not defined when I try to use the debugger
An idea for another video would be how to perform refactoring with VSCode. I used to use IntelliJ, and it seemed to offer quite a bit more. Maybe I haven’t yet found the right way in VSCode…
Should be fairly simple as long as you've set the Python interpreter to the one in the virtual environment that poetry has created. There is a setting in VS code called "Venv Folders" which you can set to wherever poetry is creating your virtual environments. Or you can change the poetry setting "virtualenvs.in-project=true" which will create a .venv in your project folder and VS Code will find it more easily when trying to select an interpreter.
Uhh. You didn't even get step one right. The extension you need is "Python Debugger". Without that, it wont work! How trust worthy is a video when step 1 is wrong?
Hi Arjan. Please Create a Video for debugging in Flask App. It's very important for me and my work as a Back-end developer with Flask. Thank you very much for all of you Videos.
👷 Join the FREE Code Diagnosis Workshop to help you review code more effectively using my 3-Factor Diagnosis Framework: www.arjancodes.com/diagnosis.
A whole series on debugging would be awesome. Seriously.
Amen
i'd love to watch that!
This is great.
A debug FastAPI video would be great too.
Thank you for all your work.
adding a vote for debug FastAPI with vscode
there is nothing different when debugging FastAPI or Django app, even Flutter app for that matter.
But VSCode will help you create the debugging setup.
I've coded with VSCode for years now but never known how to use the debugger! Looks really powerful and I guess it forces you to code a little more carefully as well
Gonna try to incorporate it in my dev workflow soon and see what difference it makes!
Thanks Arjan
Same I have been using vscode for years but never used debugger only used print statement or took my code to .ipynb to solve
This is one of the most beautiful videos I have ever watched on debugging.
I'm glad it was helpful!
Learning with you makes my brain tingles. It's like ASMR but with knowledge instead of sensitive stimuli.
That's a really original way to put it! I appreciate the compliment :)
@@ArjanCodes you're welcome. And btw, how do I pronunce the "Arjan" ? Arian ? Arj' an ?
Did not know about the conditional break points. That is so useful!
Same. For years I had no idea. :D
Glad the video was helpful!
I'll definitely be using those from now on! Better than adding a temporary if statement and putting a breakpoint inside it 😂
Great work.
A whole series of best practices for debugging with VSCode would be great.
Thanks.
I've watched many videos. This is the one I've been looking for. Just in depth.
Thanks for the precise and high quality content.
Keep coding dear Arjan.
Thank you for the kind words!
Great ... enabled me to add several new tips to my own hard learned uses so far. VS Code formerly had a great "Preview" extension that visualized the call stack and allowed stepwise execution and display of function calls, returns, etc. I found that to also be a great assist in debugging as well.
Would be great to see more advanced video about debugging!
how you add ✨ in your code? doesn't in cause trouble in debugging? pleaaaase answer. i search a lot but i couldn't find any extension.🙏🥺
One thing missing that I find myself using a lot is the debugger console. Any time I'm unsure of how exactly to do something I use a breakpoint, run my ideas at that point through the debugger console to see what works, and implement it in code.
great video! I also frequently use the tebugging terminal (Ctrl+Shift+Y), where you can calculate expressions (similar to the watch section), but can also create and manipulate variables etc.
the debugger also works great with pytest
Concise and straight to the point. That was an excellent video, thank you!
Glad you enjoyed the content!
I would love to see a debugging video for FastAPI and another video similar to this one but for pycharm.
I had no idea there were options for breakpoints. The conditional breakpoint is a big win for me, thanks!
Glad the video was helpful!
How did you get the Python Debug Console in the editor pane? I love to open terminals in the editor area, but I haven't managed this for the Debug Console.
Thank you very much! A video expanding on debugging a FastAPI application would be great!
This video is super helpful!! I'd like to request a detailed tutorial video or series for debugging fastapi!!!
How can I debug a file that I have to run from the command line? If it has imports from another folder, so I need to start it above the file directory.
You can run debugger in module mode. You define your settings via json file.
I'd like to use VSCode to attach to (and debug) running web services, written in python, which run in a container (docker or kubernetes) in the cloud somewhere (azure, aws), but it is unclear to me how to go about that.
Fastapi debugging! Yes please! Fastapi with docker would be great too.
Great video! I think that it would have been useful to cover the debug console and also VS Code's testing pane where you can collect tests and then debug individual tests. It may have also been worth mentioning that you can Debug cells in the built-in Jupyter notebooks too - but these would be good topics for a follow up!
Thanks for these basic videos. Extremely helpful
Glad you like them!
Great video. Could you do a basic vs code debugging session with pytest and pytest-bdd with scenarios please? I always run into a list index error with pytest-bdd when trying to debug a scenario that works in the terminal.
After installing launch.json file error ( i already created launch.json file), how to resolve it
Great video
This is a topic that is almost never taught
Glad you liked it!
what does the this and _this mean in variables. how are they different
A debug FastAPI video would be great.
Thank you for all your work.
Why using debugging for module instead of normal file? is there really a big advantages? and can we have a video with 3-4 different debuggers and when/why to use?
hmmm, what is this star icon in line 8? right before return average_score? Is this some fancy icon for a breakpoint?
I have a feeling it's something to do with Copilot, like a suggestion feature or something. I don't think it's relevant to the topic so I wouldn't worry for now.
Awesome as always and very useful. Thanks 🙂
Glad you liked it!
Thanks for simple and informative explaining appreciated !
Glad it was helpful!
I hope you talk about more request type in launch.json (attach, launch, remote debugging,....) and some advance topic like debug threading, asyncio debug, ....
What you sharing in the video is simple, or just for beginer.
Very good, how to debug in vscode when i run in docker?
Using this is great, but I would love to see a video that explains how to debug async code, monitor threads, maybe processes etc. Thanks Arjan for your videos. When I will be rich I will join the paid channel !
I worked closely with Spark scripts, so I'm kinda sad that VSCode features like breakpoints and such can't really be used for example checking dataframes...
Yes, we need separate video about debugging a FastAPI application
It would be really interesting to have a video on Fastapi and SQLModel as an ORM.
Thank's. I'm new to programming outside of notepad.
Fantastic video! Thank you very much!
Glad you liked it!
Thank you. I learned something
Glad it was helpful!
I love you Arjan!
Thanks for this! But what I have never managed to get working is debugging code running in a container (using Docker/Podman etc.). A demonstration of the setup for this would be very much appreciated (assuming you can figure it out!).
Thanks man that was very clear. I wondered if there is a feature like in the IDE I've been using (Spyder) where you can tinker with the variable once you've hit the breakpoint and the program is on pause. I've been finding this very useful when I'm not really sure about the correct function to use to process dataframes...
Can you please make a video about debugging a multi-file package under development?
Always confused how to structure file directories & import statements to work both during debugging and after distribution.
yes, please do a video about debugging FastAPI!
Debugging python code inside docker from vscode will be great!
debugging a Flask application would also be incredibly useful. A problem with most RUclips debugging videos is that they show how to work on simple scripts, but debugging an app running on a framework is way more complicated 😅
Nice help. FastAPI debugging would be great
Thanks for the content!
@ArjanCodes A video on how to set up for debugging AMD modules using node would be amazing. I cannot get it to work. I think node uses commonJS and does not understand AMD modules so I get a ReferenceError: define is not defined when I try to use the debugger
Nice video, can you create a video on how to debug Django Rest Framework?
A guide for debugging in Django Application will be great
Yes, debugging fastapi and other framework will be super cool, please do it ;)
Please I would love to know how to debug a FastAPI app.
An idea for another video would be how to perform refactoring with VSCode. I used to use IntelliJ, and it seemed to offer quite a bit more. Maybe I haven’t yet found the right way in VSCode…
I would love to see a debugging video for FastAPI
Make a whole series on debubbiging Please
debuging FastApi or streamlit applications would be interesting
Please do a series on debugging
Well I came hoping for info on using the debug console... not covered unfortunately.
Can you include a video about debugging modules?
I found this one to be a little basic… is that all there is to debugging in VSCode? I’d be interested in knowing more advanced techniques.
Hey, It would be very helpful, If you make a video for Pycharm (FastAPI project)
Please make a video about debugging inside a docker container, it's seriously hard to find a good tutorial on it
Would be very useful a whole series on Django
Hi, great video, could you make one showing how to debug apps made with poetry?
i agree - i have major issues pointing to the python interpreter since its not in the same dir as the code base
Should be fairly simple as long as you've set the Python interpreter to the one in the virtual environment that poetry has created. There is a setting in VS code called "Venv Folders" which you can set to wherever poetry is creating your virtual environments. Or you can change the poetry setting "virtualenvs.in-project=true" which will create a .venv in your project folder and VS Code will find it more easily when trying to select an interpreter.
helpful! thanks
You're welcome!
More debug! On VSCode 👋
Ok I thought I knew everything related to Debug in VSCode...but it turned out I didn't...
Same 😂
Should have showed what the launch.json file does. It's a requirement in many professional environments to debug with that prepared.
nothing happens when I click on "Run and Debug"
Uhh. You didn't even get step one right. The extension you need is "Python Debugger". Without that, it wont work! How trust worthy is a video when step 1 is wrong?
Debugging videos for FastAPI and Django, please!!!
We want the fast API one!!!
I work with fast API along side docker compose. Any recommendations for debbuging and testing? I'm a bit overwhelmed with the amount of options.
til about conditional breakpoint it should be quite useful
I'm letting you know, I'd like to watch your video about FastAPI debuging
VSC does not have inline method refactoring. For some of advanced refactoring and debugging. PyCharm is much better.
Yes I'd like to watch FastAPI Debugging
Every time I wonder so I just have to ask: what color iMac is that? 😂
There's a bug in your data. No way Austen is rated lower than Orwell.
Flask, please.
It took all these years for him to make this video???
It should’ve been a day 1 topic.
“Everything you need to know”
“These are the very basics”
😅
f5
Hi Arjan. Please Create a Video for debugging in Flask App. It's very important for me and my work as a Back-end developer with Flask.
Thank you very much for all of you Videos.
I’m still looking for an alternative to VSCode with a decent debugger… can’t figure out how to debug efficiently in vim or emacs. UwU