aboutsummaryrefslogtreecommitdiffstats
path: root/docs/content/doc/developers
diff options
context:
space:
mode:
authorwxiaoguang <wxiaoguang@gmail.com>2021-08-29 11:25:08 +0800
committerGitHub <noreply@github.com>2021-08-28 23:25:08 -0400
commitd24eb6e6ced43fbf198617c36686655570bb92bc (patch)
treee1cbe4e030a0db87df2d78d2baee700bba351361 /docs/content/doc/developers
parent7815f244d6254f85fca439b0bbfaf63c0e263ea4 (diff)
downloadgitea-d24eb6e6ced43fbf198617c36686655570bb92bc.tar.gz
gitea-d24eb6e6ced43fbf198617c36686655570bb92bc.zip
Add GoLand configuration in hacking on gitea (#16843)
Co-authored-by: zeripath <art27@cantab.net>
Diffstat (limited to 'docs/content/doc/developers')
-rw-r--r--docs/content/doc/developers/hacking-on-gitea.en-us.md13
1 files changed, 13 insertions, 0 deletions
diff --git a/docs/content/doc/developers/hacking-on-gitea.en-us.md b/docs/content/doc/developers/hacking-on-gitea.en-us.md
index 96db0a01bb..23e3b37680 100644
--- a/docs/content/doc/developers/hacking-on-gitea.en-us.md
+++ b/docs/content/doc/developers/hacking-on-gitea.en-us.md
@@ -309,6 +309,19 @@ Visual Studio Code. Look at
[`contrib/ide/README.md`](https://github.com/go-gitea/gitea/blob/main/contrib/ide/README.md)
for more information.
+## GoLand
+
+Clicking the `Run Application` arrow on the function `func main()` in `/main.go`
+can quickly start a debuggable gitea instance.
+
+The `Output Directory` in `Run/Debug Configuration` MUST be set to the
+gitea project directory (which contains `main.go` and `go.mod`),
+otherwise, the started instance's working directory is a GoLand's temporary directory
+and prevents gitea from loading dynamic resources (eg: templates) in a development environment.
+
+To run unit tests with SQLite in GoLand, set `-tags sqlite,sqlite_unlock_notify`
+in `Go tool arguments` of `Run/Debug Configuration`.
+
## Submitting PRs
Once you're happy with your changes, push them up and open a pull request. It