By default, the revel run command without a run_mode defaults to dev.

Hot Reload

As part of the development cycle, Revel can be configured to ‘watch’ for local file changes, and recompile as necessary.

Revel comes with a test suite, see the Testing Module

Debug using gdb

Go applications can be debugged using the GNU Debugger (GDB).

  • Debugging with GDB
  • See Go’s official GDB guide
  • This excellent go example at lincon loop blog post
  • A StackOverflow - Revel debugging HOWTO question

    Intellij debugging (goland)

  • Create your project, for this example i will be using canonical “revel new github.com/myaccount/my-app”

  • “revel run github.com/myaccount/my-app” to generate tmp/main.go - this file is needed by intellij
  • Shutdown the running server
  • Create project in intellij from existing sources
  • Create run configuration and in “Program arguments” add “-importPath github.com\myaccount\my-app -srcPath \src -runMode dev"
  • Point “File” to \src\github.com\myaccount\my-app\app\tmp\main.go
  • In “before launch” add “Run external tool”. There:Program: \bin\revel.exeParamerets: build github.com/myaccount/my-app

原文: https://revel.github.io/manual/debug.html