How to Run & Debug Python Code With Live Preview as You Type in VSCode IDE
35 views
Jul 4, 2025
Get the full source code of application here:
View Video Transcript
0:00
Uh hello guys, welcome to this video. So
0:02
in this video, I'll show you a VS code
0:04
extension which actually is a live
0:06
compiler and debugger for your Python
0:08
code. So if you write Python code side
0:10
by side, it will run the Python code
0:13
with live preview. So this is actually
0:15
the extension for VS code, just go to
0:18
the extensions tab and just type here
0:20
live code for Python. And this extension
0:23
will come right here. It's realtime
0:24
Python.
0:27
It will evaluate your code as you type
0:30
in real time in the right hand corner of
0:32
the screen. It will show you the output
0:33
here as you type the code here. So
0:35
simply install this extension.
0:39
I have already installed it and simply
0:41
it will be installed it globally. And
0:44
now simply run a simple Python file
0:47
here. Create a app. py file and you will
0:50
see this icon appearing. This blue icon
0:52
appearing. Simply click on that icon and
0:55
you will see instantly it will as you
0:57
type the Python code just declare some
1:00
variables.
1:02
So as you can see on the right hand side
1:04
it is showing you the output here. And
1:06
if you declare let's suppose a variable
1:08
I say 5 + 5 it will show the result to
1:12
me sum is equal to 10. You can evaluate
1:15
here any expressions. You don't need to
1:17
run the Python script for this. So let's
1:19
suppose I declare
1:22
a function right here which returns the
1:25
sum of two numbers. So now if I call
1:27
this function right here
1:30
3a 4 it exactly tells you which is the
1:34
arguments which is 3a 4 and this
1:37
function returns seven. So in this easy
1:40
way you can just have any function. This
1:44
is a subtract function.
1:47
Same goes 10, 4. It basically returns
1:50
six. So this is actually a live Python
1:52
compiler and debugger extension for VS
1:55
code. Simply install it and start using
1:57
it. And this will save you a lot of time
1:59
because you no longer need to go to
2:01
terminal and uh simply run the Python
2:04
script because earlier on you need to
2:07
run the Python script and then see the
2:09
output.
2:11
It will simply if you write a print
2:13
statement it will show you the output.
2:16
write itself in the output section you
2:19
will see hello world it can be a string
2:22
it can be a number as well so 5 + 5 you
2:25
can see it's equal to 10 so this is the
2:27
output
2:29
so live preview it will show you on the
2:32
right hand side so this is the extension
2:34
simply install it
2:37
live code for python and start using it
2:40
and it actually it can be any expression
2:44
any function as
2:48
can see
2:55
2a 3 it returns six. This is a
2:58
multiplication function addition
3:00
subtraction you can do this. So, thank
3:03
you very much for watching this video
3:04
and also check out my website
3:07
freemediatools.com
3:08
uh which contains uh thousands of tools.
#Programming
#Scripting Languages
#Software