Skip to content

Commit dcde596

Browse files
committed
Document debugging process
Closes #1465.
1 parent ee14db2 commit dcde596

File tree

4 files changed

+40
-2
lines changed

4 files changed

+40
-2
lines changed

.github/issue_template.md

+3
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,8 @@
22
Please file all questions and support requests at https://www.reddit.com/r/codeserver/
33
The issue tracker is only for bugs.
44
5+
Please see https://github.com/cdr/code-server/blob/master/doc/FAQ.md#how-do-i-debug-issues-with-code-server
6+
and include any logging information relevant to the issue.
7+
58
Please search for existing issues before filing.
69
-->

doc/FAQ.md

+29
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,35 @@ code-server tries the following in order:
142142
3. The workspace or directory passed on the command line.
143143
4. The last opened workspace or directory.
144144

145+
## How do I debug issues with code-server?
146+
147+
First run code-server with at least `debug` logging (or `trace` to be really
148+
thorough) by setting the `--log` flag or the `LOG_LEVEL` environment variable.
149+
`-vvv` and `--verbose` are aliases for `--log trace`.
150+
151+
```
152+
code-server --log debug
153+
```
154+
155+
Once this is done, replicate the issue you're having then collect logging
156+
information from the following places:
157+
158+
1. stdout.
159+
2. The most recently created directory in the `logs` directory (found in the
160+
data directory; see below for how to find that).
161+
3. The browser console and network tabs.
162+
163+
Additionally, collecting core dumps (you may need to enable them first) if
164+
code-server crashes can be helpful.
165+
166+
### Where is the data directory?
167+
168+
If the `XDG_DATA_HOME` environment variable is set the data directory will be
169+
`$XDG_DATA_HOME/code-server`. Otherwise the default is:
170+
171+
1. Linux: `~/.local/share/code-server`.
172+
2. Mac: `~/Library/Application\ Support/code-server`.
173+
145174
## Enterprise
146175

147176
Visit [our enterprise page](https://coder.com) for more information about our

src/browser/pages/error.html

+4-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,10 @@
66
name="viewport"
77
content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no"
88
/>
9-
<meta http-equiv="Content-Security-Policy" content="style-src 'self'; manifest-src 'self'; img-src 'self' data:; font-src 'self' data:;" />
9+
<meta
10+
http-equiv="Content-Security-Policy"
11+
content="style-src 'self'; manifest-src 'self'; img-src 'self' data:; font-src 'self' data:;"
12+
/>
1013
<title>{{ERROR_TITLE}} - code-server</title>
1114
<link rel="icon" href="{{BASE}}/static/{{COMMIT}}/src/browser/media/favicon.ico" type="image/x-icon" />
1215
<link

src/browser/pages/update.html

+4-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,10 @@
66
name="viewport"
77
content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no"
88
/>
9-
<meta http-equiv="Content-Security-Policy" content="style-src 'self'; manifest-src 'self'; img-src 'self' data:; font-src 'self' data:;" />
9+
<meta
10+
http-equiv="Content-Security-Policy"
11+
content="style-src 'self'; manifest-src 'self'; img-src 'self' data:; font-src 'self' data:;"
12+
/>
1013
<title>code-server</title>
1114
<link rel="icon" href="{{BASE}}/static/{{COMMIT}}/src/browser/media/favicon.ico" type="image/x-icon" />
1215
<link

0 commit comments

Comments
 (0)