보관함

vscode go Example실행

프로젝트용 폴더 생성

main.go 파일 생성

package main import “fmt” func main() { fmt.Println(“hello world”) }

vscode 로 폴더 열기

F5 로 실행 -> Error

dlv 파일이 없어서 생긴 문제 인것 같아서 일단 delve 패키지 install

brew install delve

하지만

go: go.mod file not found in current directory or any parent directory; see […]

2021년 5월 내가 설치한 vscode 확장들

그때 그때 사용하지 않는 것을 Disable 해서 쓴다.

Auto Rename Tag Bootstrap 4, Font awesome4, Font Awesome5 Free & Pro snippets Bootstrap 5 Snippets C/C++ C# C# Extensions CSS Peek Debugger for Chrome DotENV ES7 React/Redux/GraphQL/React-Native snippets Font Awesome Auto-complete & Preview Git History GitLens Git supercharged Go Highlight Matching Tag Html (C#) HTML […]

golang VSCode에 Debugging 환경 구축

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 } ] }

[…]