You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/content/1.guide/1.features.md
+20-61Lines changed: 20 additions & 61 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -112,79 +112,38 @@ Module authors who want to expose their own data can install [`@devframes/plugin
112
112
The `getServerData` DevTools RPC that backed the old viewer is deprecated (`NDT_DEP_0009`). It still works as a compatibility shim but will be removed; use the Data Inspector panel instead.
113
113
::
114
114
115
-
## VS Code Server
115
+
## Code Server
116
116
117
-
The VS Code Server integration in Nuxt DevTools enhances your development experience by bringing the power of Visual Studio Code directly into your browser. With this feature, you can seamlessly edit and debug your Nuxt projects using the familiar interface of VS Code.
117
+
The **Code Server** member in the Nuxt group embeds [Coder's `code-server`](https://coder.com/docs/code-server/install). It is enabled by default: Nuxt DevTools detects the local `code-server` binary during setup, but starts no process until you choose **Launch editor**. If the binary is missing, the member shows installation instructions instead.
118
118
119
-
Nuxt DevTools supports the following ways of integrating with VS Code:
120
-
121
-
### Connecting to an existing code-server instance
122
-
123
-
Set `reuseExistingServer` to true in runtime config for `devtools/vscode` and set the `port` option to specify a port (defalts to 3080):
124
-
125
-
```ts [nuxt.config.ts]
126
-
exportdefaultdefineNuxtConfig({
127
-
devtools: {
128
-
vscode: {
129
-
reuseExistingServer: true,
130
-
port: 3090
131
-
}
132
-
}
133
-
})
134
-
```
135
-
136
-
### Running a code-server instance locally
137
-
138
-
You can use either the [Microsoft Visual Studio Code Server](https://code.visualstudio.com/docs/remote/vscode-server) (via the `code` or `code-server` cli tools) or the [Coder VS Code Server](https://coder.com/docs/code-server/latest/install) (via the `code-server` cli tool) by setting the `codeServer` parameter under `devtools/vscode` in the runtime configuration.
139
-
140
-
Options for the codeServer parameter are:
141
-
142
-
| Type | Option |
143
-
| ----------------- | ------------------- |
144
-
| MS Code CLI |`ms-code-cli`|
145
-
| MS Code Server |`ms-code-server`|
146
-
| Coder Code Server |`coder-code-server`|
147
-
148
-
You can set the `port` parameter to listen on a specific port (default 3080) and you can set the `host` parameter if you need to listen on a particular host interface (useful for devcontainers or docker containers that listen on ipv6 by default).
149
-
150
-
**Example**:
151
-
152
-
```ts [nuxt.config.ts]
153
-
exportdefaultdefineNuxtConfig({
154
-
devtools: {
155
-
vscode: {
156
-
codeServer: 'ms-code-server',
157
-
host: '0.0.0.0',
158
-
port: 3090
159
-
}
160
-
}
161
-
})
162
-
```
163
-
164
-
### Remotely via a MS VS Code server tunnel
165
-
166
-
Set the `mode` option in `devtools/vscode` runtime configuration to `tunnel`. You can set the name of the tunnel to connect to using the `tunnel` option under `devtools/vscode/tunnel` in runtime configuration)
119
+
When launched, Code Server opens the Nuxt root directory by default, hands the generated authenticated session to the iframe, and streams process output to the built-in **Terminals** member. The process is also stopped when Nuxt closes.
167
120
168
121
```ts [nuxt.config.ts]
169
122
exportdefaultdefineNuxtConfig({
170
123
devtools: {
171
-
vscode: {
172
-
mode: 'tunnel',
173
-
tunnel: {
174
-
name: 'my-tunnel-name'
175
-
}
176
-
}
177
-
}
124
+
codeServer: {
125
+
enabled: true,
126
+
// All fields below are optional.
127
+
bin: '/usr/local/bin/code-server',
128
+
cwd: '/workspace/my-app',
129
+
serverPort: 8080,
130
+
host: '127.0.0.1',
131
+
args: ['--disable-file-downloads'],
132
+
env: { LOG_LEVEL: 'info' },
133
+
cookieSuffix: 'my-app',
134
+
startTimeout: 30_000,
135
+
},
136
+
},
178
137
})
179
138
```
180
139
181
-
### Code Server Installation Instructions
140
+
The curated options are `enabled`, `bin`, `cwd`, `serverPort`, `host`, `args`, `env`, `cookieSuffix`, and `startTimeout`. When omitted, the upstream plugin defaults apply: the `code-server` binary, loopback host, a free port near Code Server's port 8080, and a 30-second startup timeout. Nuxt changes only the default `cwd`, setting it to the Nuxt root. Set `codeServer.enabled: false` to omit the member.
182
141
183
-
To get started with Microsoft VS Code Server, follow the installation instructions provided by [Microsoft Visual Studio Code Server](https://code.visualstudio.com/docs/remote/vscode-server)
142
+
Nuxt DevTools owns authentication, so `args` cannot override `--auth`, `--bind-addr`, or `--cookie-suffix`, and `env` cannot set `PASSWORD` or `HASHED_PASSWORD`. Configure the bind host and cookie suffix through their dedicated fields.
184
143
185
-
To get started with Coder Code Server, follow the installation instructions provided by [Code Server Installation Guide](https://coder.com/docs/code-server/latest/install)
144
+
The editor iframe connects directly to the Code Server port; Nuxt does not proxy it through `app.baseURL`. The browser must be able to reach that host and port, and an HTTPS page cannot embed an HTTP-only editor because of browser mixed-content rules. Binding to a non-loopback interface also exposes the port to that network, so apply the usual network controls.
186
145
187
-
For more information on the benefits and features of VS Code Server, refer to [the official Visual Studio Code blog](https://code.visualstudio.com/blogs/2022/07/07/vscode-server)
146
+
This integration uses the experimental upstream `@devframes/plugin-code-server`. HTTPS, reverse proxies, containers, and remote port forwarding are governed by that plugin and your environment; Nuxt does not extend them or provide the removed Microsoft/tunnel/reuse modes.
0 commit comments