You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
程序很简单,在aa()调用的地方打断点,goland调试运行到aa()断点生效,点击步入,就会进入func aa()方法,点击步过,就会跳转到其他地方(经过排查就是因为gopsutil导致的,实在没找到解决办法),参见下面的截图:
The program is very simple. Break the point where aa() is called. Goland debugs and runs until the aa() breakpoint takes effect. Click Step to enter the func aa() method. Click Step to jump to other places. (After investigation, it was caused by gopsutil, and no solution was found). See the screenshot below:
The mac environment uses gopsutil, which makes it impossible to use goland to debug go programs because the code location jumped during the debugging process is incorrect.
Environment (please complete the following information):
ProductName: macOS
ProductVersion: 14.2.1
BuildVersion: 23C71
Darwin fushengbindeMacBook-Pro.local 23.2.0 Darwin Kernel Version 23.2.0: Wed Nov 15 21:54:10 PST 2023; root:xnu-10002.61.3~2/RELEASE_X86_64 x86_64
The text was updated successfully, but these errors were encountered:
Lomanic
changed the title
使用 gopsutil 包导致 goland 调试程序不能正常使用(乱跳转)
Using the gopsutil package causes the goland debugger to not work properly (random jumps) #1602
Mar 2, 2024
Lomanic
changed the title
Using the gopsutil package causes the goland debugger to not work properly (random jumps) #1602
Using the gopsutil package causes the goland debugger to not work properly (random jumps)
May 10, 2024
Describe the bug
程序很简单,在aa()调用的地方打断点,goland调试运行到aa()断点生效,点击步入,就会进入func aa()方法,点击步过,就会跳转到其他地方(经过排查就是因为gopsutil导致的,实在没找到解决办法),参见下面的截图:
To Reproduce
Expected behavior
mac环境使用了gopsutil导致无法使用goland调试go程序,因为调试过程中跳转的代码位置不正确。
Environment (please complete the following information):
ProductName: macOS
ProductVersion: 14.2.1
BuildVersion: 23C71
Darwin fushengbindeMacBook-Pro.local 23.2.0 Darwin Kernel Version 23.2.0: Wed Nov 15 21:54:10 PST 2023; root:xnu-10002.61.3~2/RELEASE_X86_64 x86_64
Additional context
GO111MODULE="off"
GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/fushengbin/Library/Caches/go-build"
GOENV="/Users/fushengbin/Library/Application Support/go/env"
GOEXE=""
GOEXPERIMENT=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOINSECURE=""
GOMODCACHE="/Users/fushengbin/go/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="darwin"
GOPATH="/Users/fushengbin/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/local/Cellar/go/1.19.2/libexec"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/Cellar/go/1.19.2/libexec/pkg/tool/darwin_amd64"
GOVCS=""
GOVERSION="go1.19.2"
GCCGO="gccgo"
GOAMD64="v1"
AR="ar"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD=""
GOWORK=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -arch x86_64 -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/gf/bdfrq_nn62n1zgxg2pr3x1qr0000gn/T/go-build2919649744=/tmp/go-build -gno-record-gcc-switches -fno-common"
The text was updated successfully, but these errors were encountered: