Eclipse Che: bash: gdb: 命令未找到

huangapple go评论92阅读模式
英文:

Eclipse Che: bash: gdb: command not found

问题

Che似乎很有前途,但有人在使用它吗?它对任何人都有效吗?

我偶尔尝试使用Che调试器来调试golang或nodejs。我相信Che是使用Docker的开发人员的选择,我只需要一个工作流程。

我在Docker中运行Che,具体步骤在这里描述:https://eclipse.org/che/docs/setup/getting-started/index.html#syntax

我无法让delve调试器正常工作,所以今天我尝试了gdb。

我只是使用了go stack(web-go-simple)并编辑了调试命令:

go build -gcflags "-N -l" -o gdb_sandbox main.go

gdb gdb_sandbox

它显示bash: gdb: command not found

如果我编辑运行/调试配置,它会报错cannot connect to localhost:8080。我将端口设置为8080,二进制路径设置为:

${current.project.path}/web-go-simple/gdb_sandbox

我只是想调试go代码,有人做过吗?

我还尝试使用nodejs:https://eclipse.org/che/docs/ide/debug/#nodejs
这也无法连接。

英文:

Che seems promising but is anyone using it or does it work for anyone at all?

Once in a while I try to make Che debugger work with golang or nodejs. I do belive Che is the way for devs using docker, I just need a workflow.

I run Che in docker described here: https://eclipse.org/che/docs/setup/getting-started/index.html#syntax

I am unable to get delve debugger to work so today I tried gdb.

Just using the go stack(web-go-simple) and edited the debug command:

go build -gcflags "-N -l" -o gdb_sandbox main.go

gdb gdb_sandbox

It gives bash: gdb: command not found

If I edit the run / Debug Configuration it complains about cannot connect to localhost:8080. I set the port to 8080 and binary path to:

${current.project.path}/web-go-simple/gdb_sandbox

I just want to debug go - anyone done this?

I also tried using nodejs: https://eclipse.org/che/docs/ide/debug/#nodejs
This also can not connect.

答案1

得分: 1

正确,go或nodejs堆栈中都没有安装gdb或gdbserver。您可以使用以下步骤轻松构建自定义堆栈:

FROM eclipse/node
RUN sudo apt-get update && sudo apt-get install gdb

您还可以在运行的工作区中使用相同的软件包管理器命令安装gdb和gdbserver。这些堆栈基于Ubuntu 16.04。

英文:

Correct, neither gdb nor gdbserver are installed in go or nodejs stacks. You can easily build a custom stack using the following recipe:

FROM eclipse/node
RUN sudo apt-get update && sudo apt-get install gdb

You can also install gdb and gdbserver right in a running workspace, using the same package manager commands. These stacks are based on Ubuntu 16.04

huangapple
  • 本文由 发表于 2017年5月24日 02:45:05
  • 转载请务必保留本文链接:https://go.coder-hub.com/44142732.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定