Vscode editor code debugging

Time:2021-7-17

Code server: refer to vs code official documents

https://code.visualstudio.com/docs/languages/go#_debugging

1.go debugging

docker rm -f g3; docker run -itd --name g3 -v ~/workdir/coder-server/code:/code -p 8080:8080 cffycls/webide-debian:go-php-python-v1.2
  • Initialize init.sh

visithttp://127.0.0.1:8080/, set environment variables and install delve tool

#!/bin/bash

mkdir -p $HOME/.go
export GOROOT=/usr/local/go
export GOBIN=$GOROOT/bin
export GOPATH=$HOME/.go
export GO111MODULE=on
export GOPROXY=https://mirrors.aliyun.com/goproxy/

sudo chown coder:coder -R /usr/local/go
go install github.com/go-delve/delve/cmd/[email protected]

PHP debugging

Nodejs debugging (omitted)

Java debugging

Python debugging