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

smart way to debug #12318

Closed
1 of 7 tasks
zhoutt96 opened this issue Jul 24, 2020 · 3 comments · Fixed by #12330
Closed
1 of 7 tasks

smart way to debug #12318

zhoutt96 opened this issue Jul 24, 2020 · 3 comments · Fixed by #12330
Labels
issue/needs-feedback For bugs, we need more details. For features, the feature must be described in more detail

Comments

@zhoutt96
Copy link

  • Gitea version (or commit ref):
  • Git version:
  • Operating system:
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
    • Not relevant
  • Log gist:

Description

Hi gitea team, sorry to bother.
I am creating this issue to ask is there any smart way for debugging?
For now, when I do a change in backend, I need to rebuild the project everytime.
thanks.
...

Screenshots

@a1012112796
Copy link
Member

Hello, you can try make help to get all build options, thanks.

@lunny
Copy link
Member

lunny commented Jul 25, 2020

@a1012112796 @zhoutt96 I think debug is a low efficient development and it's not recommand by golang team. The best practice is writing unit test and add logs.

@lunny lunny added the issue/needs-feedback For bugs, we need more details. For features, the feature must be described in more detail label Jul 25, 2020
@silverwind
Copy link
Member

silverwind commented Jul 25, 2020

I'd appreciate a watch-backend mode that rebuilds and runs whenever source files change.

Something like https://github.com/markbates/refresh or https://github.com/cosmtrek/air.

silverwind added a commit to silverwind/gitea that referenced this issue Jul 26, 2020
This leverages `air` to watch the backend files and trigger `make
backend` automatically when they change. It seems to work rather well
together with `watch-frontend`.

Fixes: go-gitea#12318
techknowlogick added a commit that referenced this issue Jul 27, 2020
* Add 'watch-backend'

This leverages `air` to watch the backend files and trigger `make
backend` automatically when they change. It seems to work rather well
together with `watch-frontend`.

Fixes: #12318

* rework docs to a new section for continuous build

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
@go-gitea go-gitea locked and limited conversation to collaborators Nov 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
issue/needs-feedback For bugs, we need more details. For features, the feature must be described in more detail
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants