Debugging 如何调试goland中的revel应用程序?
我想用Jetbrain的gogland内置调试器调试我的revel应用程序,但gogland运行配置允许设置包或文件运行场景,而不是调试由Debugging 如何调试goland中的revel应用程序?,debugging,go,revel,goland,Debugging,Go,Revel,Goland,我想用Jetbrain的gogland内置调试器调试我的revel应用程序,但gogland运行配置允许设置包或文件运行场景,而不是调试由revel run myapp启动的进程。好的,gogland内置调试器是 我认为您必须尝试使用选项attach运行调试: Attach to an already running process and begin debugging it. This command will cause Delve to take control of an alrea
revel run myapp启动的进程。好的,gogland内置调试器是
我认为您必须尝试使用选项attach
运行调试:
Attach to an already running process and begin debugging it.
This command will cause Delve to take control of an already running process, and
begin a new debug session. When exiting the debug session you will have the
option to let the process continue or kill it.
Usage:
dlv attach pid [flags]
附加到已运行的进程并开始调试它。
此命令将使Delve控制已在运行的进程,并且
开始新的调试会话。退出调试会话时,您将有
允许进程继续或终止进程的选项。
用法:
dlv附加pid[标志]
我现在没有安装gogland,但我过去也遇到过类似的问题。现在gogland正在安装
我发现创建调试配置是正式的。如果你不介意的话,我会在这里发布
INTELLIJ调试(GOLAND)
创建您的项目,在本例中,我将使用规范的“revel new github.com/myaccount/my app”
“revel run github.com/myaccount/my app”生成tmp/main.go-intellij需要此文件
关闭正在运行的服务器
创建运行配置并在“程序参数”中添加“-importPath github.com\myaccount\my app-srcPath\src-runMode dev”
将“文件”指向\src\github.com\myaccount\myapp\app\tmp\main.go
在“启动前”中添加“运行外部工具”。其中:程序:\bin\revel(.exe)参数:build github.com/myaccount/my-app
它适用于Linux和Windows问题是,我不想单独安装delve。我宁愿使用gogland捆绑的delve二进制文件,并使用gogland中的GUI调试器。事实上,我已经安装了gogland。我在bin中找到了dlv
。但我没有找到定制dlv
启动的可能性。我看这里:我没有在上,我们看不到从gogland配置附加到pid的可能性。调试过程尚未实施(gogland EAP 7)。以下是相关问题,您可以按照此问题获取更新:感谢链接。revel build命令需要两个参数,即应用程序本身(您已安装),以及将被覆盖的目标路径。由于缺少目标路径,上述指令失败。