File tree Expand file tree Collapse file tree 1 file changed +37
-3
lines changed Expand file tree Collapse file tree 1 file changed +37
-3
lines changed Original file line number Diff line number Diff line change @@ -53,7 +53,7 @@ Hello World!
53
53
54
54
## VS Code
55
55
56
- ## Install plug in
56
+ ### Install plug in
57
57
58
58
Install "Go for Visual Studio Code" (ms-vscode.go)
59
59
@@ -65,7 +65,41 @@ Set go.toolsGoPath to Tools/bin path
65
65
66
66
![ settings] ( res/gousersettings.png )
67
67
68
- ISSUE: Can't debug a [ program using stdin] ( https://github.com/Microsoft/vscode-go/issues/219#issuecomment-192164367 ) .
68
+
69
+
70
+ ### Debug
71
+
72
+ [ VS Code Debug Wiki] ( https://github.com/Microsoft/vscode-go/wiki/Debugging-Go-code-using-VS-Code )
73
+
74
+ Start remote debugger in the prog dir (addresses STDIN issue below):
75
+
76
+ ``` bash
77
+ $ cd someprogram
78
+ $ gd
79
+ API server listening at: [::]:2345
80
+ ...
81
+ ```
82
+
83
+ Create a 'Remote' config in VS Code, set breakpoints and debug.
84
+
85
+ ``` bash
86
+ " configurations" : [
87
+ {
88
+ " name" : " Remote" ,
89
+ " type" : " go" ,
90
+ " request" : " launch" ,
91
+ " mode" : " remote" ,
92
+ " program" : " ${fileDirname} " ,
93
+ " remotePath" : " ${fileDirname} " ,
94
+ " port" : 2345,
95
+ " host" : " 127.0.0.1" ,
96
+ " env" : {},
97
+ " apiVersion" : 1,
98
+ " args" : []
99
+ }
100
+ ` ` `
101
+
102
+ ISSUE: Can' t debug a [program using stdin](https://github.com/Microsoft/vscode-go/issues/219#issuecomment-192164367).
69
103
70
104
## GoLand
71
105
@@ -81,7 +115,7 @@ Preferences (or wrench bottom right). Set GOPATH for project and uncheck from e
81
115
82
116

83
117
84
- ## Debugging with Delve
118
+ ## Debugging with Delve in Terminal
85
119
86
120
[Delve from the cmdline](https://lincolnloop.com/blog/debugging-go-code/)
87
121
You can’t perform that action at this time.
0 commit comments