Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

Installing Claude Code in VS Code

Installing Claude Code in VS Code

If you do not like using Claude Code's command-line model, you can install Claude Code in the VS Code editor.

Open VS Code, go to the Extensions marketplace, and search for Claude Code Installation:

After installation, click the Claude Code icon in the upper-right corner to enter the Claude Code page:

This way, those with an account can log in using /login:

You can also enter /config in the dialog to open settings, and check the Disable Login Prompt option to close the login page:

We can select code in a file and have Claude Code analyze, explain, or modify it. After selection, it will show the number of selected lines of code:

When Claude needs to modify a file, it automatically opens a side-by-side comparison view, with the original file content on the left and the proposed changes on the right, then asks whether you agree to the modification.

Using the prompt box (chat input box)

The prompt box is where you chat with Claude. It's very powerful; the following are common features that are easy to pick up:

1. Permission modes:
Click the prompt box'sFootermode indicator to switch permission modes.

2. Command menu:
Type in the prompt box /(or click the input box) to open the command menu.

Common options include: attach files, switch models, enable extended thinking, view usage (type /usage)。

The "Customize" section below can also manage MCP servers, hooks, memory, permissions, and plugins.

With Terminal icon commands will open directly in VS Code's integrated terminal.

3. Context usage indicator: Below the prompt box, it shows in real time how much of Claude's context window (context) you have used.

Claude will automatically compact content for you; if you want to compact manually, type /compact .

4. Extended Thinking: When encountering complex problems, you can let Claude spend more time thinking deeply.

Toggle it on/off through the command menu (type /) to toggle on/off.

5. Multi-line input:
Press Shift + Enter You can add line breaks without sending the message immediately.

The same applies in the pop-up "Other" free text box.

Referencing files and folders (@ mention feature)

Want Claude to understand your code? Just use @ to mention a file or folder!

Input @ Follow it with a file or folder name, and Claude will automatically read the content, answer questions, or make direct modifications.

SupportedFuzzy matching, no need to type the full name:

解释一下 @auth 的逻辑(会自动匹配 auth.js、AuthService.ts 等)

@src/components/ 里有什么?(文件夹要加斜杠 / )

Super useful tips:

For large PDF files: You can specify which pages Claude should read, for example "pages 1-10" or "starting from page 3".

Restoring past conversations

Click the Claude Code panel'sTopdrop-down menu to see all your chat history.

SupportedKeyword search, and you can also filter by time (today, yesterday, past 7 days, etc.).

Click any record to fully restore the previous conversation.

Hovering over a record will show a Rename and Delete button: