Skip to content
This repository has been archived by the owner on Jul 15, 2023. It is now read-only.

vscode debug issues #717

Closed
skeleton1231 opened this issue Jan 11, 2017 · 6 comments
Closed

vscode debug issues #717

skeleton1231 opened this issue Jan 11, 2017 · 6 comments

Comments

@skeleton1231
Copy link

skeleton1231 commented Jan 11, 2017

My GOPATH

➜ test1 echo $PATH
/usr/local/bin:/usr/local/sbin:/Users/huanghaitao/bin:/opt/local/bin:/opt/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/opt/X11/bin:/opt/local/lib/mysql55/bin:/Users/huanghaitao/go/bin:/usr/local/go/bin:/opt/local/lib/mysql55/bin:/Users/huanghaitao/Downloads/adt-bundle-mac-x86_64-20140702 2/sdk/tools:/Users/huanghaitao/Downloads/adt-bundle-mac-x86_64-20140702 2/sdk/platform-tools:/Users/huanghaitao/android_project/apache-ant-1.9.4/bin:/Users/huanghaitao/.composer/vendor/bin:/Users/huanghaitao/Downloads/rar:/Users/huanghaitao/go_project/protoc-3.0.0-osx-x86_64/bin/protoc
➜ test1 echo $GOPATH
/Users/huanghaitao/go

image

sudo dlv debug main.go
could not launch process: error waiting for thread stop -268435459

image

on vscode IDE

image

I can find the dlv in Terminal
image

What's the problem? Hope someone help me, Thanks a lot!

@ramya-rao-a
Copy link
Contributor

I can't say much about the error that you see when you run dlv from the command line,

For the error that you see in VS Code, can you set the GOPATH in the env field in the launch.config and try again?

"env": {"GOPATH": "/Users/huanghaitao/go"}

@skeleton1231
Copy link
Author

skeleton1231 commented Jan 11, 2017

@ramya-rao-a

my lanuch.json

{
"version": "0.2.0",
"configurations": [
{
"name": "Launch",
"type": "go",
"request": "launch",
"mode": "debug",
"remotePath": "",
"port": 6688,
"host": "127.0.0.1",
"program": "${workspaceRoot}/src/calc/",
"env": {"GOPATH": "/Users/huanghaitao/go"},
"args": [],
"showLog": true
}
]
}

I use homebrew to reinstall go and delve

image

It works now on Terminal

image

But still debug error on Vscode

image

2017/01/11 15:10:57 server.go:73: Using API v1
2017/01/11 15:10:57 debugger.go:66: launching process with args: [/Users/huanghaitao/go/src/calc/debug]
could not launch process: could not fork/exec

@ramya-rao-a
Copy link
Contributor

Well, atleast the error is different :)
Now VS Code is able to launch delve, delve is giving those errors

@derekparker Do you know in which scenario will dlv give these errors?
image

@ramya-rao-a
Copy link
Contributor

After a bit more digging this is what I found.

First off, this issue is a duplicate of #269
And related to https://github.com/derekparker/delve/issues/357

@skeleton1231 Can you go through both these issues and see if the steps there help you at all?

@skeleton1231
Copy link
Author

@ramya-rao-a

see #717, I solved the problem. thanks!

@ramya-rao-a
Copy link
Contributor

@skeleton1231 You have linked the same issue :) I am guessing you meant #20 (comment) solved it for you

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants