Setting Up Your JavaScript Development Environment (VS Code & Chrome DevTools)

![[JS 강좌] 2강 - 개발 환경 구축하기 (VS Code, Chrome 개발자 도구)](/uploads/editor/JS-%EA%B0%95%EC%A2%8C-2%EA%B0%95-%EA%B0%9C%EB%B0%9C-%ED%99%98%EA%B2%BD-%EA%B5%AC%EC%B6%95%ED%95%98%EA%B8%B0-VS-Code-Chrome-%EA%B0%9C%EB%B0%9C%EC%9E%90-%EB%8F%84%EA%B5%AC-20260706-0dfe9b.webp)
What is a Development Environment?
Before starting programming, the first step is to set up your development environment.
A development environment refers to the programs you use to write, run, and debug code.
JavaScript has a very simple setup compared to other programming languages.
You only need to install two free programs to start developing:
VS Code
Google Chrome
With just these two, you can handle most web development tasks.
What is VS Code?
VS Code (Visual Studio Code) is the most widely used free code editor among developers worldwide.
Developed by Microsoft, it works on Windows, macOS, and Linux.
Here's why VS Code is so popular:
Free
Fast performance
Supports auto-completion
Offers many extensions
Integrates with Git
Easily writes HTML, CSS, and JavaScript
Since it's used by both beginners and professional developers, we'll base our upcoming lessons on VS Code.
Installing VS Code
Download the installer from the official VS Code website.
The installation process is straightforward.
You can simply click through the 'Next' buttons to complete the setup.
After installation, launch VS Code from your desktop or start menu.
It may initially display in English, but you can install a Korean language pack for a Korean interface if desired.
Creating a Project Folder
When starting a project, it's good practice to create a folder first.
For example, let's create this structure:
javascript-study
In VS Code, select File → Open Folder to open the newly created folder.
All subsequent files will be saved within this folder.
Creating Your First HTML File
Create a new file with the following name:
index.html
Enter the following content:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Getting Started with JavaScript</title>
</head>
<body>
<h1>First JavaScript Example</h1>
</body>
</html>
We haven't written any JavaScript yet, but all future exercises will be done within this HTML file.
Adding JavaScript
You can write JavaScript by adding a <script> tag inside your HTML.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Getting Started with JavaScript</title>
</head>
<body>
<h1>First JavaScript Example</h1>
<script>
alert("Hello!");
</script>
</body>
</html>
After saving the file and opening it in a browser, you'll see a pop-up alert.
This is your first JavaScript execution result.
Why Use Google Chrome?
JavaScript runs primarily in web browsers.
In this course, we'll use Google Chrome because it has powerful developer tools and is widely used in professional settings.
Chrome's developer tools make it easy to check errors, inspect HTML structure, and view JavaScript execution results.
Opening Developer Tools
You can easily open Chrome's developer tools using any of these methods:
F12
Ctrl + Shift + I
Right-click → Inspect
Once open, you'll see various tabs.
You don't need to use all of them right away.
For this course, we'll focus on the Console tab.
What is Console?
The Console is where you view JavaScript execution results and check for errors.
For example, try writing:
console.log("Hello.");
After running in the browser and opening the Console tab, you'll see this output:
Hello.
In professional development, console.log() is frequently used to verify program execution or display variable values.
Running JavaScript Directly in Console
You can run JavaScript directly in the Console without modifying files.
For example, type this into the Console:
5 + 10
The result will be:
15
Or try this to see an alert immediately:
alert("JavaScript")
The Console is a great space for practicing JavaScript.
Managing JavaScript in Separate Files
In professional settings, JavaScript is often managed in separate files rather than directly inside HTML.
Create a file named script.js and write:
alert("External JavaScript file.");
Then link it in your HTML like this:
<script src="script.js"></script>
This approach keeps HTML and JavaScript separate, making the code cleaner.
We'll use this method frequently as we progress through the course.
Where to Check First When Errors Occur
Errors are inevitable in programming.
The key is not to fear errors but to learn how to find them.
In JavaScript, the first place to check for errors is the Console.
If there's a typo or incorrect syntax, error messages will appear in the Console.
Developing the habit of reading error messages helps you resolve issues much faster.
Key Takeaways from This Lesson
Today we set up your basic JavaScript development environment.
Remember these key points:
VS Code is the program for writing code.
Chrome is the browser that runs JavaScript.
Developer Tools (F12) are essential for web development.
The Console displays execution results and errors.
JavaScript can be written inside HTML or in external files.
Conclusion
A good developer isn't someone who installs many complex programs, but rather someone who effectively uses basic tools.
With just VS Code and Chrome's developer tools, you can handle most JavaScript learning and practice.
As we continue the course, you'll become comfortable using the Console to check results and fix errors naturally.
In our next lesson, we'll begin exploring JavaScript syntax with variables, data types, and operators.
FAQ
Why use VS Code instead of other editors?
VS Code is free, fast, supports auto-completion, has many extensions, and works across all major operating systems. It's widely used by both beginners and professional developers.
What is the purpose of the Console in Chrome DevTools?
The Console displays JavaScript execution results and error messages, making it essential for debugging and verifying code functionality during development.
Korean Source
This article is an English localization of a Korean-language report from BlogScore. Original: [JS 강좌] 2강 - 개발 환경 구축하기 (VS Code, Chrome 개발자 도구)