Tag: 视觉工作室代码

Golang远程debugging器与vscode

我已经按照https://github.com/Microsoft/vscode-go/wiki/Debugging-Go-code-using-VS-Code将我的vscode附加到远程debugging器。 该代码在docker上执行,go文件位于共享驱动器上,可以从docker和我的工作站访问。 在我的工作站上,我可以启动代码并使用以下configuration连接到远程debugging器: { "name": "Remote", "type": "go", "request": "launch", "mode": "remote", "remotePath": "/some/remote/path", "port": 2345, "host": "127.0.0.1", "program": "${workspaceRoot}", "env": {}, "args": [], "showLog": true } 但是,它不会停在断点上。 我的程序崩溃,远程debugging器只说: log breakpoint 2017/08/15 14:34:21 sql: no rows in result set 2017/08/15 14:34:22 debugger.go:473: halting 我知道我的断点的path被访问,因为我在之前添加了一个日志logging探针。 任何想法,为什么它不停止在断点?

在Sublime Text,VS Code中使用IDE linter而不安装PHP(或Nodejs,…)

我的开发使用docker来build立项目,所以我不想在我的主机上安装任何软件包。 但是当使用像Sublime Text或VS Code这样的IDE linter工具时,所有的linters都需要指定可执行path(例如:PHP)。 有没有人遇到过这种情况呢?

Visual Studio代码Ubuntu的aspnet core 2容器debugging

我GOOGLE了,看着stackoverflow,但无法find解决办法。 build立: 主机操作系统:Ubuntu ASPNet Core 2 Dotnet 2.0 我有两个容器,一个用于MySQL的容器,另一个用于dotnet核心。 我能够在不安装CLRdebugging器的情况下运行它。 在一个容器中安装CLRdebugging器后,我试图使用Visual Studio代码来debugging运行在该容器中的aspnet core 2应用程序。 我收到以下错误: “pipe道程序”bash“意外退出。” 唯一的select是“打开Launch.json”,而launch.json中只有bash命令是: "pipeTransport": { "pipeProgram": "/bin/bash", "pipeCwd": "${workspaceRoot}", "pipeArgs": ["-c", "docker exec -i devexamapp_debug_1 /clrdbg/clrdbg –interpreter=mi"], "debuggerPath": "/vsdbg/vsdbg" debugging控制台显示如下: 开始:“/ bin / bash”-c“docker exec -i devexamapp_debug_1 / clrdbg / clrdbg –interpreter = mi”“/ vsdbg / vsdbg –interpreter = vscode” 如果我在控制台窗口中运行“/ […]

如何使用VSCode在Docker中debuggingGolang应用程序?

我正在学习在Docker中debuggingGolang应用程序。 我在shell中使用dlv connect成功了。 我可以添加断点,继续,下一步…我可以在VSCode中注意到,但正在等待halting 。 我点击左侧的function主,直到红点。 然后点击绿色button,就像“玩”一样。 程序在容器中运行,但不能停在函数main上。 我以错误的方式使用VSCode吗? 我需要你的帮助。 谢谢。 这是我的钻研形象: #Dockerfile FROM supinf/go:1.8-builder RUN apk –no-cache add tini \ && apk –no-cache add –virtual build-dependencies git \ # Compile delve && go get github.com/derekparker/delve/cmd/dlv \ && cd $GOPATH/src/github.com/derekparker/delve \ && go install github.com/derekparker/delve/cmd/dlv \ # Clean up && apk del –purge -r build-dependencies […]