How To Debug Python Code In Visual Studio Code (VSCode)

preview_player
Показать описание
(We're free online community, meet other makers!)

Hey guys this tutorial shows you the basics of debugging Python in VS Code.

00:00 How to debug python in vscode - getting started!
00:11 Creating a python class and a simple python program
00:43 Installing VSCode's Python extension
01:00 To start debugging press F5 and choose to debug either a Python Module or currently open Python file
01:16 Overview of vscode python debugging tools (continue, unpause, step over, step into, step out, reset, stop)
02:09 How to add a breakpoint to a line of code
02:40 How to change the value of a variable in python debugger
03:28 Creating an expression breakpoint
04:28 Creating a hit point breakpoint
05:20 Creating a log message breakpoint
05:51 Debug Console: where to view log messages from a breakpoint in the vscode terminal?
Рекомендации по теме
Комментарии
Автор

Exactly what I was looking for. Thank you.

impgames
Автор

Thank you for this. It has been very helpful.

michaelshaw
Автор

Nice video, too clear to understand even with my intermediate english :)

ricardocardona
Автор

Thanks, this helped me understand it better.

LukeCodes-JobbyorBust
Автор

Just found this. Thanks for the intro to debugging. What about executing a debuging program in another directory (where the data is located but the python code is in another directory in your system path)? What about the custom debug file launch.json, what's that all about?

lgf
Автор

Is it possible to break on main automatically (without specifying breakpoints) ?

tacowilco
Автор

thanks a lot! really helpful and gave you the 666 thumbup which means pretty cool! haha

litttlemooncream
Автор

I’ve yet to find if it’s possible to view the dimensions of variables, like if it’s a [128, 1, 32, 32] tensor, where can I easily find those dimensions?

blaine_stl
Автор

Great, simple tutorial. Switching to vs code from pycharm and this was helpful!

kevon
Автор

Hello sir I'm a newbie to visual studio, and whenever I run/debug my program to Chrome it just opened and within a sec or 2 it closes, i tried changing my browser, tried uninstalling and reinstalling visual studio both didn't work.
Please can you help?

fantasticbro
Автор

why when i press F5 i don't find python

adxmreal
Автор

It doesn't work. Its behaviour is like breakpoints aren't in the code.

fdffefegtetrtrg