Get the full source code of application here:
Show More Show Less View Video Transcript
0:00
Uh hello guys, in this video I'll show
0:02
you how to fix the launch.json error
0:05
which comes directly inside VS code
0:07
while you actually run your files. So I
0:11
will show you in this video. So normally
0:13
what happens when you try to run your
0:16
file.
0:17
So let's suppose we have this project
0:19
here which contains HTML, CSS and
0:21
JavaScript code here. So normally what
0:23
you do you open your JavaScript file
0:25
here. you open this file and then try to
0:29
go to run and click on this button start
0:31
debugging. So then this uh popup will
0:35
actually show right here and you select
0:37
any option right from here and then this
0:40
launch.json error comes and the debug
0:43
debugging doesn't happen instead you see
0:45
this launch dojson. So why it is doing
0:49
because normally inside what you need to
0:52
do you be you need to close this file
0:56
rather than you only need to open this
0:58
file only index html not this file
1:02
so you need to close this file close all
1:04
the files just open this index html file
1:07
the file that you want to run and then
1:10
delete this file here this launchjson
1:13
automatically creates by VS code because
1:17
Whenever you run this file,
1:20
so as you can see this JavaScript file
1:23
will run right here.
1:25
So normally by default VS code tries to
1:28
run JavaScript file. So that's why you
1:30
need to close this file. Only open this
1:32
index.html file whenever you try to
1:35
debug. So now just need to delete this
1:38
file. It's automatically created by VS
1:41
code. So now only open this index.html
1:44
file. And now just repeat this process.
1:46
Start debugging. And now the debugging
1:49
will start. As you can see the HTML file
1:51
is automatically opened in a new browser
1:54
window and it is automatically running.
1:58
So in this easy way you can start
2:00
debugging your HTML file. So the fix is
2:04
really simple. You don't need to open
2:06
this JavaScript file because if you try
2:08
to open this file again that error will
2:10
come launch.json. So now to fix that
2:13
it's really simple. You don't need to
2:17
open that file. Just open this index
2:19
html file and then run simply start
2:22
debugging. So then that error will not
2:25
happen. So this is the really easy fix
2:28
to fix that problem and solve it. So if
2:31
you if your problem is solved, please
2:34
comment and also like this video.
