What can Codex and VSCode do together? An In-Depth Guide for Developers

Image of cooperation between Codex and VSCode

The age when AI writes code. Especially, the combination of "Codex" and "VSCode (Visual Studio Code)" is a powerful weapon for many developers. In this article, we will thoroughly explain how Codex can be used with VSCode, how it differs from ChatGPT, and even what to look out for.


What is Codex and how does it differ from ChatGPT?

Codex is an AI model** developed by OpenAI that specializes in code generation. When instructed in natural language, it immediately suggests corresponding program code.

  • ChatGPT: Strong in all aspects of conversation. Also good at chatting, sentence generation, and translation.
  • Codex: Specializes in code generation and understanding, focusing on API references and syntax-based answers.

In other words, if ChatGPT is the "all-around partner," Codex is more like a "dedicated pair-pro partner for programming.


How to use Codex with VSCode

VSCode is rich in extensions and can be easily integrated with Codex-based AI assistants. The main ways to use them are as follows

  • GitHub Copilot extension. A typical example based on Codex. It automatically completes code as you type, and suggests not just one line, but function units.

  • Chat-like interface. When you ask a question with a code file open, natural language instructions such as "refactor this function" or "write a JOIN in SQL" are immediately answered.

  • Automatic snippet generation. Instruct simple for loops or regular expressions in natural language → Suggested code is inserted instantly.

--- "Write a JOIN in SQL.

What you can actually do

Using Codex with VSCode, the following tasks can be streamlined.

  • Creating new code. Example: Simply write "Read a file in Python and convert it to JSON" and propose the finished product.

  • Modifying existing code. Improvements such as "make this function faster" or "reduce memory usage" are also possible.

  • Test code generation Automatic generation of unit tests based on method input and output.

  • Multi-language support. Supports conversion between languages, such as JavaScript → Python.

--- **Multi-language support

Advantages and Cautions

Advantages

  • Significant increase in development speed
  • Easy to learn correct syntax even for beginners
  • Less time spent reading English references

Points to note

  • Proposed code must be reviewed.
  • May generate security vulnerable code
  • In team development, "who wrote the code" can easily become ambiguous

---The "who wrote the code" part can be ambiguous.

Summary: Codex x VSCode is "modern pair-pro".

The combination of Codex and VSCode can benefit both individual developers and large teams. However, it is important to follow the basic principle of "do not trust as is, review is required.

The following articles are recommended for your next reading: 👉 Comparing GPT-5 modes of thinking