|
|
※ 참고 (2026년 기준) Go 1.16 부터 모듈 모드가 기본이라 GO111MODULE=auto 로 끄는 대신 프로젝트 폴더에서 go mod init 모듈이름 으로 go.mod 를 만드는 것이 정석이다.
프로젝트용 폴더 생성
main.go 파일 생성
|
|
package main import "fmt" func main() { fmt.Println("hello world") } |
vscode 로 폴더 열기
F5 로 실행 -> Error
dlv 파일이 없어서 생긴 문제 인것 같아서 일단 delve 패키지 install
하지만 […]
vscode에 launch.json
|
|
{ // IntelliSense를 사용하여 가능한 특성에 대해 알아보세요. // 기존 특성에 대한 설명을 보려면 가리킵니다. // 자세한 내용을 보려면 https://go.microsoft.com/fwlink/?linkid=830387을(를) 방문하세요. "version": "0.2.0", "configurations": [ { "name": "Launch Package geth", "type": "go", "request": "launch", "mode": "debug", "program": "${workspaceFolder}/cmd/geth/" // main.go 가 있는 폴더 path } ] } |
관련 글: NodeJs VSCode 에 Remote Debugging 환경 구축, NodeJs 프론트엔드(Chrome) VSCode 에 Debugging 환경 구축
node를 실행
vscode에 launch.json
|
|
{ // IntelliSense를 사용하여 가능한 특성에 대해 알아보세요. // 기존 특성에 대한 설명을 보려면 가리킵니다. // 자세한 내용을 보려면 https://go.microsoft.com/fwlink/?linkid=830387을(를) 방문하세요. "version": "0.2.0", "configurations": [ { "type": "chrome", "request": "launch", "name": "Launch Chrome against localhost", "url": "http://localhost:3000", "webRoot": "${workspaceFolder}/src" } ] } |
관련 글: NodeJs VSCode 에 Remote Debugging 환경 구축, golang VSCode에 Debugging 환경 구축
|
링크
|