Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Web vs code beta docs #255

Merged
merged 9 commits into from
Jun 18, 2024
3 changes: 2 additions & 1 deletion packages/projects-docs/pages/learn/editors/web/_meta.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@
"overview": "Overview",
"commandpalette": "Command Palette",
"shortcuts": "Keyboard Shortcuts",
"themes": "Themes"
"themes": "Themes",
"vscode-web": "VS Code Web"
}
58 changes: 58 additions & 0 deletions packages/projects-docs/pages/learn/editors/web/vscode-web.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
---
title: VS Code Web
description: Introduction to a customized version ofVS Code for the web
necoline marked this conversation as resolved.
Show resolved Hide resolved
---

import { Callout } from 'nextra-theme-docs'

# VS Code for the web

Productivity is key when working in an editor. For this reason, we have embedded our CodeSandbox features within the powerful and well loved VS Code.

The web editor looks and functions as VS Code for the web, with a few built in CodeSandbox tools.
necoline marked this conversation as resolved.
Show resolved Hide resolved

![vs code web layout](../../images/vscode-web-overview.png)

The activity bar holds all the tools for managing your developer experience. The web editor will always contain the standard VS Code tools, namely the File explorer, Search, Source Control, Run and Debug and the Extension marketplace.

The web editor also comes with a CodeSandbox Devtool extension which provides access to all the unique Code Sandbox features (more on that later).

In the terminal panel, you can see all the running tasks, any private terminals as well as shared terminals (managed by CodeSandbox).
necoline marked this conversation as resolved.
Show resolved Hide resolved

While the layout is entirely customizable, the standard layout opens previews, and support tools like documentation and setup tools in the right editor panel.

# Things to know when switching over
necoline marked this conversation as resolved.
Show resolved Hide resolved

All CodeSandbox DevTools, such as previews, tasks, and shared terminals, are now nested under the “CodeSandbox DevTools” panel on the left sidebar. From there, you can manage all these DevTools when needed, but most of these actions will still be performed automatically, just like before. For example, if your project has a task configured that runs the dev server on VM startup, it will automatically open the preview for you when you open the project.

## Tasks, Terminals and Previews

Preview ports, Tasks and shared terminals are controlled through the devtool extension in the sidebar.

![CSB devtool](../../images/vscode-web-devtools.png)

**Tasks**

Tasks set in the `tasks.json` file will be listed in the Devtool extension. Here you can see all the tasks, run, stop or restart the tasks.

**Previews**

Tasks that spin up previews will be accessible in a port listed under `Previews`

You can also see the list of ports in the terminal panel under `Ports`

![Ports](../../images/vscode-web-ports.png)

**Terminals**

There are three types of terminals. The first
necoline marked this conversation as resolved.
Show resolved Hide resolved

1. Native terminal: this is managed by VS Code when you open a terminal. This is a private terminal to you that others don’t see.
necoline marked this conversation as resolved.
Show resolved Hide resolved

2. Tasks: tasks are run by Pitcher - an internal CodeSandbox service. The output of a task is streamed to a terminal window. These are displayed as a VS Code task so it is easily distinguishable from a terminal.
necoline marked this conversation as resolved.
Show resolved Hide resolved

![Tasks](../../images/vscode-web-tasks.png)

3. Shared terminal: In the sidebar, you can open a shared terminal. This terminal is managed by Pitcher, allowing others to see it.

![shared terminals](../../images/vscode-web-shared-terminal.png)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading