【Mac OSX】在eclipse里运行Go test 的一些小坑

  1. project build 找不到 packagegit

解决办法:github

  1. eclipse 读取GOPATH不对,在项目属性Go Compiler 里面去除默认选项,填写完整的GOPATHjson

  2. 查看Godep.json 确认对应代码在相应位置能够找到,这里主要有是code.google.com下的代码,由于谷歌关闭了相关站点,在godep save的时候获取不到代码照成的,通常来说去github上找到对应的clone就好,注意Rev要修改为github上的SHA串,注意这里有版本差别 eclipse

  3. go get获取到的dep版本不对,使用godep restore 从新获取代码
    ide

Goclipse debug /run不能执行Go test报错:Program file does not exist

解决办法:ui

    修改debug conifgrationgoogle

   a.build arguments:spa

        test -x -c -v -gcflags "-N -l"  xxx.com/xxx/xxxdebug

    b.path of launtch:rest

        ${workspace}/bin/xxxx_xxx.test 

    c.build-type:

        build-tests

3.run gdb --version :unknow reason

配置debug conifgration

debugger tab,gdb path:

/usr/local/bin/gdb

相关文章
相关标签/搜索