使用IntelliJ调试revel

问题描述 投票:3回答:1

我们如何配置IntelliJ来调试revel应用程序?

Run/Debug Configurations,对于FileGo tool argumentsProgram arguments来说,什么都不明显。

debugging intellij-idea revel
1个回答
0
投票

创建你的项目,对于这个例子,我将使用规范的revel new github.com/myaccount/my-app

  1. 在终端revel run github.com/myaccount/my-app中运行以生成tmp/main.go - intellij需要此文件
  2. 选择“编辑配置”以创建Run configuration。选择Go Build
  3. 选择你的文件“main.go”
  4. 粘贴在“程序参数”字符串-importPath github.com\myaccount\my-app
  5. 单击“启动前:...”并创建“运行外部工具”
  6. 那里:程序:<your gopath>/bin/revel(Windows - revel.exe)Paramerets:build github.com/myaccount/my-app,Working dir <your gopath>/bin

Screenshot示例配置

现在您可以在面板IntelliJ中运行和调试

© www.soinside.com 2019 - 2024. All rights reserved.