Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package main
- import "fmt"
- func main() {
- fmt.Println("hello world")
- for i:=uint(0); i< 10; i++{
- fmt.Println(i)
- }
- }
- $ dlv debug --headless --listen=:2345 --log --api-version=2
- API server listening at: [::]:2345
- 2017/07/20 17:23:24 debugger.go:504: continuing
- 2017/07/20 17:23:24 debugger.go:493: halting
- 2017/07/20 17:23:24 debugger.go:347: created breakpoint: &api.Breakpoint{ID:1, Name:"", Addr:0x47bb52, File:"/....../hello/hello.go", Line:6, FunctionName:"main.main", Cond:"", Tracepoint:false, Goroutine:false, Stacktrace:0, Variables:[]string(nil), LoadArgs:(*api.LoadConfig)(nil), LoadLocals:(*api.LoadConfig)(nil), HitCount:map[string]uint64{}, TotalHitCount:0x0}
- 2017/07/20 17:23:24 debugger.go:504: continuing
- 2017/07/20 17:23:28 debugger.go:516: nexting
- hello world
- 2017/07/20 17:23:28 debugger.go:516: nexting
- 2017/07/20 17:23:29 debugger.go:516: nexting
- 0
- 2017/07/20 17:23:29 debugger.go:516: nexting
- 02017/07/20 17:23:29 debugger.go:516: nexting
- 2017/07/20 17:23:29 debugger.go:516: nexting
- 1
- 2017/07/20 17:23:29 debugger.go:516: nexting
- 12017/07/20 17:23:30 debugger.go:516: nexting
- 2017/07/20 17:23:30 debugger.go:516: nexting
- 2
- 2017/07/20 17:23:30 debugger.go:516: nexting
- 42017/07/20 17:23:30 debugger.go:516: nexting
- 2017/07/20 17:23:30 debugger.go:516: nexting
- 3
- 2017/07/20 17:23:30 debugger.go:516: nexting
- 92017/07/20 17:23:31 debugger.go:516: nexting
- 2017/07/20 17:23:31 debugger.go:516: nexting
- 4
- 2017/07/20 17:23:31 debugger.go:516: nexting
- 162017/07/20 17:23:31 debugger.go:516: nexting
- 2017/07/20 17:23:31 debugger.go:516: nexting
- 5
- 2017/07/20 17:23:32 debugger.go:516: nexting
- 252017/07/20 17:23:32 debugger.go:516: nexting
- 2017/07/20 17:23:32 debugger.go:516: nexting
- 6
- 2017/07/20 17:23:32 debugger.go:516: nexting
- 362017/07/20 17:23:32 debugger.go:516: nexting
- 2017/07/20 17:23:32 debugger.go:516: nexting
- 7
- 2017/07/20 17:23:33 debugger.go:516: nexting
- 492017/07/20 17:23:33 debugger.go:516: nexting
- 2017/07/20 17:23:33 debugger.go:516: nexting
- 8
- 2017/07/20 17:23:34 debugger.go:516: nexting
- 642017/07/20 17:23:34 debugger.go:516: nexting
- 2017/07/20 17:23:34 debugger.go:516: nexting
- 9
- 2017/07/20 17:23:34 debugger.go:516: nexting
- 812017/07/20 17:23:34 debugger.go:516: nexting
- 2017/07/20 17:23:35 debugger.go:516: nexting
- 2017/07/20 17:23:35 debugger.go:516: nexting
- dlv debug --headless --listen=:2345 --log --api-version=2 -- --v --console
- 2017/07/20 17:26:51 debugger.go:97: launching process with args: [/home/...../debug --v --console]
- API server listening at: [::]:2345
- 2017/07/20 17:26:55 debugger.go:493: halting
- 2017/07/20 17:26:55 debugger.go:347: created breakpoint: &api.Breakpoint{ID:1, Name:"", Addr:0x687a73, File:"/home/..........go", Line:136, FunctionName:"main.main", Cond:"", Tracepoint:false, Goroutine:false, Stacktrace:0, Variables:[]string(nil), LoadArgs:(*api.LoadConfig)(nil), LoadLocals:(*api.LoadConfig)(nil), HitCount:map[string]uint64{}, TotalHitCount:0x0}
- 2017/07/20 17:26:55 debugger.go:347: created breakpoint: &api.Breakpoint{ID:2, Name:"", Addr:0x6869b2, File:"/home/..........go", Line:66, FunctionName:"main.main", Cond:"", Tracepoint:false, Goroutine:false, Stacktrace:0, Variables:[]string(nil), LoadArgs:(*api.LoadConfig)(nil), LoadLocals:(*api.LoadConfig)(nil), HitCount:map[string]uint64{}, TotalHitCount:0x0}
- 2017/07/20 17:26:55 debugger.go:504: continuing
- 2017/07/20 17:26:55 debugger.go:347: created breakpoint: &api.Breakpoint{ID:3, Name:"", Addr:0x687d33, File:"/home/........go", Line:143, FunctionName:"main.main", Cond:"", Tracepoint:false, Goroutine:false, Stacktrace:0, Variables:[]string(nil), LoadArgs:(*api.LoadConfig)(nil), LoadLocals:(*api.LoadConfig)(nil), HitCount:map[string]uint64{}, TotalHitCount:0x0}
- 2017/07/20 17:26:55 debugger.go:504: continuing
- 2017/07/20 17:26:57 debugger.go:516: nexting
- dlv connect HOSTNAME:2345
- Type 'help' for list of commands.
- (dlv) b ********.go:137
- Breakpoint 1 set at 0x687a86 for main.main() /home/*************.go:137
- (dlv) c
- > main.main() /home/***************************.go:137 (hits goroutine(1):1 total:1) (PC: 0x687a86)
- (dlv) n
- $ dlv debug --headless --listen=:2345 --log --api-version=2 -- --v --console
- 2017/07/20 17:37:37 debugger.go:97: launching process with args: [/home/*****************/debug --v --console]
- API server listening at: [::]:2345
- 2017/07/20 17:38:27 debugger.go:347: created breakpoint: &api.Breakpoint{ID:1, Name:"", Addr:0x687a86, File:"/home/*******************.go", Line:137, FunctionName:"main.main", Cond:"", Tracepoint:false, Goroutine:false, Stacktrace:0, Variables:[]string(nil), LoadArgs:(*api.LoadConfig)(nil), LoadLocals:(*api.LoadConfig)(nil), HitCount:map[string]uint64{}, TotalHitCount:0x0}
- 2017/07/20 17:38:35 debugger.go:504: continuing
- 2017/07/20 17:38:39 debugger.go:516: nexting
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement