Skip to content
This repository has been archived by the owner on Jul 15, 2023. It is now read-only.

Debugger not hitting breakpoints #1987

Closed
sjdweb opened this issue Oct 10, 2018 · 23 comments
Closed

Debugger not hitting breakpoints #1987

sjdweb opened this issue Oct 10, 2018 · 23 comments

Comments

@sjdweb
Copy link

sjdweb commented Oct 10, 2018

If this is a bug report, please share

  • a sample code which can be used to reproduce the issue
  • any Go related settings you might have added/changed

launch.json

{
  // Use IntelliSense to learn about possible attributes.
  // Hover to view descriptions of existing attributes.
  // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
  "version": "0.2.0",
  "configurations": [
    {
      "name": "Launch",
      "type": "go",
      "request": "launch",
      "mode": "auto",
      "program": "${fileDirname}",
      "envFile": "${workspaceRoot}/.env",
      "showLog": true,
			"trace": "verbose"
    },
    {
			"name": "Launch Service",
			"type": "go",
			"request": "launch",
			"mode": "debug",
      // "program": "${fileDirname}",
      "program": "${workspaceRoot}/cmd/searchservice",
      "env": {},
      "envFile": "${workspaceRoot}/.env",
			"args": [],
      "showLog": true,
			"trace": "verbose"
		}
  ]
}

Steps to Reproduce:

Adding a breakpoint when running

  1. Add breakpoint in go-kit service layer
  2. Hit endpoint and nothing happens
    Output:
DisconnectRequest
HaltRequest
Verbose logs are written to:
/var/folders/15/8142tc7d3nz6t21xz0h7hx040000gp/T/vscode-go-debug.txt
9:38:35 PM, 10/10/2018
InitializeRequest
InitializeResponse
Using GOPATH: /Users/sean/go
Current working directory: /Users/sean/go/src/github.com/<redacted>/searchservice/cmd/searchservice
Running: /Users/sean/go/bin/dlv debug github.com/<redacted>/searchservice/cmd/searchservice --headless=true --listen=127.0.0.1:29317 --api-version=2 --log=true --
API server listening at: 127.0.0.1:29317
time="2018-10-10T21:38:35+01:00" level=info msg="launching process with args: [/Users/sean/go/src/github.com/<redacted>/searchservice/cmd/searchservice/debug]" layer=debugger
InitializeEvent
SetBreakPointsRequest
All cleared
Creating on: /Users/sean/go/src/github.com/<redacted>/searchservice/service/service.go:31
All set:[{"id":1,"name":"","addr":23502409,"file":"/Users/sean/go/src/github.com/<redacted>/searchservice/service/service.go","line":31,"functionName":"github.com/<redacted>/searchservice/service.SearchService.SearchThing","Cond":"","continue":false,"goroutine":false,"stacktrace":0,"LoadArgs":{"FollowPointers":true,"MaxVariableRecurse":1,"MaxStringLen":64,"MaxArrayValues":64,"MaxStructFields":-1},"LoadLocals":{"FollowPointers":true,"MaxVariableRecurse":1,"MaxStringLen":64,"MaxArrayValues":64,"MaxStructFields":-1},"hitCount":{},"totalHitCount":0}]
SetBreakPointsResponse
time="2018-10-10T21:38:35+01:00" level=info msg="created breakpoint: &api.Breakpoint{ID:1, Name:\"\", Addr:0x1669e49, File:\"/Users/sean/go/src/github.com/<redacted>/searchservice/service/service.go\", Line:31, FunctionName:\"github.com/<redacted>/searchservice/service.SearchService.SearchThing\", Cond:\"\", Tracepoint:false, Goroutine:false, Stacktrace:0, Variables:[]string(nil), LoadArgs:(*api.LoadConfig)(0xc0016648a0), LoadLocals:(*api.LoadConfig)(0xc0016648d0), HitCount:map[string]uint64{}, TotalHitCount:0x0}" layer=debugger
ConfigurationDoneRequest
ContinueRequest
ContinueResponse
time="2018-10-10T21:38:35+01:00" level=debug msg=continuing layer=debugger
{"caller":"main.go:132","during":"Listen","err":"listen tcp :9000: bind: address already in use","transport":"gRPC","ts":"2018-10-10T20:38:36.025135Z"}
continue state {"Running":false,"Threads":null,"NextInProgress":false,"exited":true,"exitStatus":1,"When":""}
TerminatedEvent
DisconnectRequest
HaltRequest
time="2018-10-10T21:38:36+01:00" level=debug msg=halting layer=debugger
DisconnectRequest to parent

Adding a breakpoint before running debug

  1. Add breakpoint in go-kit service layer
  2. Program pauses but not visually broken in my code, see screenshot
    image
    ^ I can click the top of the callstack which will then allow me to continue, but at no point does this become an interactive debug. I can see locals like so:
    image

Output:

Verbose logs are written to:
/var/folders/15/8142tc7d3nz6t21xz0h7hx040000gp/T/vscode-go-debug.txt
9:42:10 PM, 10/10/2018
InitializeRequest
InitializeResponse
Using GOPATH: /Users/sean/go
Current working directory: /Users/sean/go/src/github.com/<redacted>/searchservice/cmd/searchservice
Running: /Users/sean/go/bin/dlv debug github.com/<redacted>/searchservice/cmd/searchservice --headless=true --listen=127.0.0.1:13149 --api-version=2 --log=true --
API server listening at: 127.0.0.1:13149
time="2018-10-10T21:42:12+01:00" level=info msg="launching process with args: [/Users/sean/go/src/github.com/<redacted>/searchservice/cmd/searchservice/debug]" layer=debugger
InitializeEvent
SetBreakPointsRequest
All cleared
Creating on: /Users/sean/go/src/github.com/<redacted>/searchservice/service/service.go:31
All set:[{"id":1,"name":"","addr":23502409,"file":"/Users/sean/go/src/github.com/<redacted>/searchservice/service/service.go","line":31,"functionName":"github.com/<redacted>/searchservice/service.SearchService.SearchThing","Cond":"","continue":false,"goroutine":false,"stacktrace":0,"LoadArgs":{"FollowPointers":true,"MaxVariableRecurse":1,"MaxStringLen":64,"MaxArrayValues":64,"MaxStructFields":-1},"LoadLocals":{"FollowPointers":true,"MaxVariableRecurse":1,"MaxStringLen":64,"MaxArrayValues":64,"MaxStructFields":-1},"hitCount":{},"totalHitCount":0}]
SetBreakPointsResponse
time="2018-10-10T21:42:12+01:00" level=info msg="created breakpoint: &api.Breakpoint{ID:1, Name:\"\", Addr:0x1669e49, File:\"/Users/sean/go/src/github.com/<redacted>/searchservice/service/service.go\", Line:31, FunctionName:\"github.com/<redacted>/searchservice/service.SearchService.SearchThing\", Cond:\"\", Tracepoint:false, Goroutine:false, Stacktrace:0, Variables:[]string(nil), LoadArgs:(*api.LoadConfig)(0xc000c840c0), LoadLocals:(*api.LoadConfig)(0xc000c840f0), HitCount:map[string]uint64{}, TotalHitCount:0x0}" layer=debugger
ConfigurationDoneRequest
ContinueRequest
ContinueResponse
time="2018-10-10T21:42:12+01:00" level=debug msg=continuing layer=debugger
{"addr":":9000","caller":"main.go:136","transport":"gRPC","ts":"2018-10-10T20:42:12.570826Z"}
{"Rebalanced: %+vn":{"Type":1,"Claimed":null,"Released":null,"Current":{}},"caller":"main.go:106","stream":"kafka","ts":"2018-10-10T20:42:12.680024Z"}
continue state {"Running":false,"currentThread":{"id":2353277,"pc":23502409,"file":"/Users/sean/go/src/github.com/<redacted>/searchservice/service/service.go","line":31,"function":{"name":"github.com/<redacted>/searchservice/service.SearchService.SearchThing","value":23502336,"type":0,"goType":0,"optimized":false},"goroutineID":8,"breakPoint":{"id":1,"name":"","addr":23502409,"file":"/Users/sean/go/src/github.com/<redacted>/searchservice/service/service.go","line":31,"functionName":"github.com/<redacted>/searchservice/service.SearchService.SearchThing","Cond":"","continue":false,"goroutine":false,"stacktrace":0,"LoadArgs":{"FollowPointers":true,"MaxVariableRecurse":1,"MaxStringLen":64,"MaxArrayValues":64,"MaxStructFields":-1},"LoadLocals":{"FollowPointers":true,"MaxVariableRecurse":1,"MaxStringLen":64,"MaxArrayValues":64,"MaxStructFields":-1},"hitCount":{"8":1},"totalHitCount":1},"breakPointInfo":{"arguments":[{"name":"req","addr":824636509432,"onlyAddr":false,"type":"*github.com/<redacted>/searchservice/gen/pb.SearchThingRequest","realType":"*github.com/<redacted>/searchservice/gen/pb.SearchThingRequest","flags":8,"kind":22,"value":"","len":1,"cap":0,"children":[{"name":"","addr":824635204000,"onlyAddr":false,"type":"github.com/<redacted>/searchservice/gen/pb.SearchThingRequest","realType":"github.com/<redacted>/searchservice/gen/pb.SearchThingRequest","flags":0,"kind":25,"value":"","len":23,"cap":0,"children":[{"name":"Term","addr":824635204000,"onlyAddr":false,"type":"string","realType":"stri[...]
StoppedEvent("breakpoint")
ThreadsRequest
goroutines [{"id":1,"currentLoc":{"pc":16989700,"file":"/usr/local/go/src/runtime/proc.go","line":303,"function":{"name":"runtime.gopark","value":16989488,"type":0,"goType":0,"optimized":true}},"userCurrentLoc":{"pc":16967550,"file":"/usr/local/go/src/runtime/netpoll.go","line":173,"function":{"name":"internal/poll.runtime_pollWait","value":16967456,"type":0,"goType":0,"optimized":true}},"goStatementLoc":{"pc":17167275,"file":"/usr/local/go/src/runtime/asm_amd64.s","line":201,"function":{"name":"runtime.rt0_go","value":17166976,"type":0,"goType":0,"optimized":true}},"startLoc":{"pc":16988256,"file":"/usr/local/go/src/runtime/proc.go","line":110,"function":{"name":"runtime.main","value":16988256,"type":0,"goType":0,"optimized":true}},"threadID":0,"unreadable":""},{"id":2,"currentLoc":{"pc":16989700,"file":"/usr/local/go/src/runtime/proc.go","line":303,"function":{"name":"runtime.gopark","value":16989488,"type":0,"goType":0,"optimized":true}},"userCurrentLoc":{"pc":16989700,"file":"/usr/local/go/src/runtime/proc.go","line":303,"function":{"name":"runtime.gopark","value":16989488,"type":0,"goType":0,"optimized":true}},"goStatementLoc":{"pc":16989125,"file":"/usr/local/go/src/runtime/proc.go","line":240,"function":{"name":"runtime.init.4","value":16989072,"type":0,"goType":0,"optimized":true}},"startLoc":{"pc":16989152,"file":"/usr/local/go/src/runtime/proc.go","line":243,"function":{"name":"runtime.forcegchelper","value":16989152,"type":0,"goType":0,"optimized":true}},"threadID"[...]
ThreadsResponse [{"id":1,"name":"internal/poll.runtime_pollWait"},{"id":2,"name":"runtime.gopark"},{"id":18,"name":"runtime.gopark"},{"id":19,"name":"runtime.gopark"},{"id":20,"name":"runtime.asmcgocall"},{"id":21,"name":"os/signal.signal_recv"},{"id":27,"name":"github.com/<redacted>/searchservice/vendor/github.com/Shopify/sarama.(*client).backgroundMetadataUpdater"},{"id":3,"name":"runtime.asmcgocall"},{"id":25,"name":"github.com/<redacted>/searchservice/vendor/github.com/rcrowley/go-metrics.(*meterArbiter).tick"},{"id":26,"name":"github.com/<redacted>/searchservice/vendor/github.com/Shopify/sarama.(*Broker).responseReceiver"},{"id":34,"name":"runtime.asmcgocall"},{"id":35,"name":"github.com/<redacted>/searchservice/vendor/github.com/Shopify/sarama.(*Broker).sendAndReceive"},{"id":36,"name":"main.action.func1"},{"id":37,"name":"main.action.func2"},{"id":50,"name":"runtime.asmcgocall"},{"id":51,"name":"internal/poll.runtime_pollWait"},{"id":8,"name":"github.com/<redacted>/searchservice/service.SearchService.SearchThing"},{"id":53,"name":"github.com/<redacted>/searchservice/vendor/google.golang.org/grpc/internal/transport.(*controlBuffer).get"},{"id":54,"name":"github.com/<redacted>/searchservice/vendor/google.golang.org/grpc/internal/transport.(*http2Server).keepalive"},{"id":55,"name":"internal/poll.runtime_pollWait"}]
StackTraceRequest
ThreadsRequest
locations [{"pc":23502409,"file":"/Users/sean/go/src/github.com/<redacted>/searchservice/service/service.go","line":31,"function":{"name":"github.com/<redacted>/searchservice/service.SearchService.SearchThing","value":23502336,"type":0,"goType":0,"optimized":false},"Locals":[],"Arguments":[{"name":"req","addr":824636509432,"onlyAddr":false,"type":"*github.com/<redacted>/searchservice/gen/pb.SearchThingRequest","realType":"*github.com/<redacted>/searchservice/gen/pb.SearchThingRequest","flags":8,"kind":22,"value":"","len":1,"cap":0,"children":[{"name":"","addr":824635204000,"onlyAddr":false,"type":"github.com/<redacted>/searchservice/gen/pb.SearchThingRequest","realType":"github.com/<redacted>/searchservice/gen/pb.SearchThingRequest","flags":0,"kind":25,"value":"","len":23,"cap":0,"children":[{"name":"Term","addr":824635204000,"onlyAddr":false,"type":"string","realType":"string","flags":0,"kind":24,"value":"insignia","len":8,"cap":0,"children":[],"base":824633877120,"unreadable":"","LocationExpr":"","DeclLine":0},{"name":"Offset","addr":824635204016,"onlyAddr":false,"type":"int32","realType":"int32","flags":0,"kind":2,"value":"0","len":0,"cap":0,"children":[],"base":0,"unreadable":"","LocationExpr":"","DeclLine":0},{"name":"Limit","addr":824635204020,"onlyAddr":false,"type":"int32","realType":"int32","flags":0,"kind":2,"value":"0","len":0,"cap":0,"children":[],"base":0,"unreadable":"","LocationExpr":"","DeclLine":0},{"name":"SortBy","addr":824635204024,"onlyAddr":false,"type":"github.com/fore[...]
StackTraceResponse
goroutines [{"id":1,"currentLoc":{"pc":16989700,"file":"/usr/local/go/src/runtime/proc.go","line":303,"function":{"name":"runtime.gopark","value":16989488,"type":0,"goType":0,"optimized":true}},"userCurrentLoc":{"pc":16967550,"file":"/usr/local/go/src/runtime/netpoll.go","line":173,"function":{"name":"internal/poll.runtime_pollWait","value":16967456,"type":0,"goType":0,"optimized":true}},"goStatementLoc":{"pc":17167275,"file":"/usr/local/go/src/runtime/asm_amd64.s","line":201,"function":{"name":"runtime.rt0_go","value":17166976,"type":0,"goType":0,"optimized":true}},"startLoc":{"pc":16988256,"file":"/usr/local/go/src/runtime/proc.go","line":110,"function":{"name":"runtime.main","value":16988256,"type":0,"goType":0,"optimized":true}},"threadID":0,"unreadable":""},{"id":2,"currentLoc":{"pc":16989700,"file":"/usr/local/go/src/runtime/proc.go","line":303,"function":{"name":"runtime.gopark","value":16989488,"type":0,"goType":0,"optimized":true}},"userCurrentLoc":{"pc":16989700,"file":"/usr/local/go/src/runtime/proc.go","line":303,"function":{"name":"runtime.gopark","value":16989488,"type":0,"goType":0,"optimized":true}},"goStatementLoc":{"pc":16989125,"file":"/usr/local/go/src/runtime/proc.go","line":240,"function":{"name":"runtime.init.4","value":16989072,"type":0,"goType":0,"optimized":true}},"startLoc":{"pc":16989152,"file":"/usr/local/go/src/runtime/proc.go","line":243,"function":{"name":"runtime.forcegchelper","value":16989152,"type":0,"goType":0,"optimized":true}},"threadID"[...]
ThreadsResponse [{"id":1,"name":"internal/poll.runtime_pollWait"},{"id":2,"name":"runtime.gopark"},{"id":18,"name":"runtime.gopark"},{"id":19,"name":"runtime.gopark"},{"id":20,"name":"runtime.asmcgocall"},{"id":21,"name":"os/signal.signal_recv"},{"id":27,"name":"github.com/<redacted>/searchservice/vendor/github.com/Shopify/sarama.(*client).backgroundMetadataUpdater"},{"id":3,"name":"runtime.asmcgocall"},{"id":25,"name":"github.com/<redacted>/searchservice/vendor/github.com/rcrowley/go-metrics.(*meterArbiter).tick"},{"id":26,"name":"github.com/<redacted>/searchservice/vendor/github.com/Shopify/sarama.(*Broker).responseReceiver"},{"id":34,"name":"runtime.asmcgocall"},{"id":35,"name":"github.com/<redacted>/searchservice/vendor/github.com/Shopify/sarama.(*Broker).sendAndReceive"},{"id":36,"name":"main.action.func1"},{"id":37,"name":"main.action.func2"},{"id":50,"name":"runtime.asmcgocall"},{"id":51,"name":"internal/poll.runtime_pollWait"},{"id":8,"name":"github.com/<redacted>/searchservice/service.SearchService.SearchThing"},{"id":53,"name":"github.com/<redacted>/searchservice/vendor/google.golang.org/grpc/internal/transport.(*controlBuffer).get"},{"id":54,"name":"github.com/<redacted>/searchservice/vendor/google.golang.org/grpc/internal/transport.(*http2Server).keepalive"},{"id":55,"name":"internal/poll.runtime_pollWait"}]
@youngderekm
Copy link

I think I'm seeing the same. In my case, my breakpoint appears to be hit - the program pauses, the callstack for my function says "PAUSED ON BREAKPOINT", but the I click on that thread it doesn't open the stack and shows no variables. I can continue the program and the thread goes back to "RUNNING" state, but that's all I see. I'm using go 1.11, vscode 1.28.0.

@jpopadak
Copy link

jpopadak commented Oct 12, 2018

I just started having this issue too. It started yesterday and I believe there was a VSCode update (and maybe an extension update?).

As @youngderekm stated, it seems to hit the breakpoint, but nothing shows in the stack, the variables sometimes show (about 10% of the time I try to debug). One thing to note. If I have a previous breakpoint, somewhere BEFORE the GRPC endpoint gets hit, the debugger works correctly, but still does not show any debugging info for the breakpoint in question.

For example: If I am inside of a GRPC Validate() method using the GRPC Validator interceptor, it properly debugs all the way until it attempts to call my implementation of the GRPC Endpoint itself. If I were to Step In that method, it breaks the debugger. The code below is the generated server-side source that calls my implementation of the endpoint. The debugger works in this location where >>>> is denoted. Once I tell it to step in, it fails.

func _ResourceClassification_GetClassificationType_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(GetClassificationTypeRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(ResourceClassificationServer).GetClassificationType(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/<REDACTED>.ResourceClassification/GetClassificationType",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
>>>>       return srv.(ResourceClassificationServer).GetClassificationType(ctx, req.(*GetClassificationTypeRequest))
	}
	return interceptor(ctx, in, info, handler)
}

Verbose logs from the debugger is attached. The last few lines includes me stepping into the function that is failing.
verboseLogs.txt

@youngderekm
Copy link

I see these errors in the VSCode Developer Tools console which seem to be related:

  ERR [UriError]: Scheme is missing: {scheme: "", authority: "", path: "<autogenerated>", query: "", fragment: ""}: Error: [UriError]: Scheme is missing: {scheme: "", authority: "", path: "<autogenerated>", query: "", fragment: ""}
    at file:///Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:125:506
    at t.e (file:///Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:126:340)
    at new t (file:///Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:127:895)
    at Function.e.parse (file:///Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:127:155)
    at new e (file:///Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:2956:631)
    at e.getSource (file:///Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:2973:602)
    at file:///Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:2572:367
    at Array.map (<anonymous>)
    at e.getCallStackImpl.t.session.stackTrace.then.n.stoppedDetails.n.stoppedDetails.framesErrorMessage (file:///Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:2572:333)
    at Object.g [as _notify] (file:///Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:160:729)
    at Object.enter (file:///Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:164:61)
    at n.Class.derive._oncancel._run (file:///Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:165:902)
    at n.Class.derive._oncancel._completed (file:///Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:165:343)
    at file:///Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:2605:843
    at t.e.acceptMessage (file:///Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:2609:49)
    at t.handleData (file:///Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:2610:155)
    at Socket.<anonymous> (file:///Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:2609:643)
    at emitOne (events.js:116:13)
    at Socket.emit (events.js:211:7)
    at addChunk (_stream_readable.js:263:12)
    at readableAddChunk (_stream_readable.js:250:11)
    at Socket.Readable.push (_stream_readable.js:208:10)
    at Pipe.onread (net.js:594:20)
errors.ts:48 WARNING: Promise with no error callback:234
errors.ts:49 {exception: Error: [UriError]: Scheme is missing: {scheme: "", authority: "", path: "<autogenerated>", query: ""…, error: null, promise: n.C…s.d…e._creator, handler: undefined, id: 234, …}
errors.ts:51 Error: [UriError]: Scheme is missing: {scheme: "", authority: "", path: "<autogenerated>", query: "", fragment: ""}
    at uri.ts:30
    at t.e (uri.ts:173)
    at new t (uri.ts:388)
    at Function.e.parse (uri.ts:270)
    at new e (debugSource.ts:55)
    at e.getSource (debugSession.ts:744)
    at debugModel.ts:459
    at Array.map (<anonymous>)
    at e.getCallStackImpl.t.session.stackTrace.then.n.stoppedDetails.n.stoppedDetails.framesErrorMessage (debugModel.ts:458)
    at Object.g [as _notify] (winjs.base.js:1191)
    at Object.enter (winjs.base.js:867)
    at n.Class.derive._oncancel._run (winjs.base.js:1089)
    at n.Class.derive._oncancel._completed (winjs.base.js:1057)
    at rawDebugSession.ts:514
    at t.e.acceptMessage (debugAdapter.ts:146)
    at t.handleData (debugAdapter.ts:226)
    at Socket.<anonymous> (debugAdapter.ts:203)
    at emitOne (events.js:116)
    at Socket.emit (events.js:211)
    at addChunk (_stream_readable.js:263)
    at readableAddChunk (_stream_readable.js:250)
    at Socket.Readable.push (_stream_readable.js:208)
    at Pipe.onread (net.js:594)

@sjdweb
Copy link
Author

sjdweb commented Oct 15, 2018

@youngderekm I am seeing the same error too.

Also see this in the Output > Log (Window)

[2018-10-15 14:13:24.150] [renderer4] [error] [UriError]: Scheme is missing: {scheme: "", authority: "", path: "<autogenerated>", query: "", fragment: ""}: Error: [UriError]: Scheme is missing: {scheme: "", authority: "", path: "<autogenerated>", query: "", fragment: ""}
    at file:///Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:125:506
    at t.e (file:///Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:126:340)
    at new t (file:///Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:127:895)
    at Function.e.parse (file:///Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:127:155)
    at new e (file:///Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:2956:631)
    at e.getSource (file:///Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:2973:602)
    at file:///Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:2572:367
    at Array.map (<anonymous>)
    at e.getCallStackImpl.t.session.stackTrace.then.n.stoppedDetails.n.stoppedDetails.framesErrorMessage (file:///Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:2572:333)
    at Object.g [as _notify] (file:///Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:160:729)
    at Object.enter (file:///Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:164:61)
    at n.Class.derive._oncancel._run (file:///Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:165:902)
    at n.Class.derive._oncancel._completed (file:///Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:165:343)
    at file:///Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:2605:843
    at t.e.acceptMessage (file:///Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:2609:49)
    at t.handleData (file:///Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:2610:155)
    at Socket.<anonymous> (file:///Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:2609:643)
    at emitOne (events.js:116:13)
    at Socket.emit (events.js:211:7)
    at addChunk (_stream_readable.js:263:12)
    at readableAddChunk (_stream_readable.js:250:11)
    at Socket.Readable.push (_stream_readable.js:208:10)
    at Pipe.onread (net.js:594:20)

@jpeletier
Copy link

I have the same issue. Going back to vscode 1.27 (August) solved it for me.

@jig
Copy link

jig commented Oct 16, 2018

I have the same issue. Using Go 1.11.1 and vscode 1.28.1.
Going back to vscode 1.27.2 solved it for me.
Ubuntu 16.04 LTS

@sjdweb
Copy link
Author

sjdweb commented Oct 16, 2018

Assume you downloaded from here?

@jig
Copy link

jig commented Oct 16, 2018

@sjdweb yes (well, in fact I still had a local copy)

@eliastor
Copy link

Any workaround available?

@eliastor
Copy link

BTW such behaviour occurs with projects outside $GOPATH/src/

@freezlite
Copy link
Contributor

freezlite commented Oct 19, 2018

I guess problem with this commit
microsoft/vscode@cef0992#diff-2e2415aa74df8729e8b700ae772baf79R61

@sjdweb
Copy link
Author

sjdweb commented Oct 19, 2018

Still happening for me on the latest build.

@freezlite
Copy link
Contributor

freezlite commented Oct 19, 2018

So the reason is that RPC return "<autogenerated>" text here https://github.com/Microsoft/vscode-go/blob/master/src/debugAdapter/goDebug.ts#L777 in location.file. Previously vscode dont handle this well, but now commit change this.
I found dirty hack to fix this

locations.forEach((location, i, object) => {
	if (location.file === "<autogenerated>") {
		object.splice(i, 1);
	}
});

@freezlite
Copy link
Contributor

Here is pull request, please dont blame on me if this is not correct way to resolve the problem, but it works for me #2029

@ramya-rao-a
Copy link
Contributor

The bug has been fixed upstream and is available in the latest Insiders.

Can folks here try the latest Insiders and share if the issue is resolved or not?

@sjdweb
Copy link
Author

sjdweb commented Oct 22, 2018

I can confirm this appears to be fixed in the latest insiders!

@ramya-rao-a
Copy link
Contributor

ramya-rao-a commented Nov 7, 2018

@freezlite's fix is now out in the latest update to the Go extension (0.7.0)
Thanks @freezlite!

@jpeletier
Copy link

@ramya-rao-a "Now out" or "not out"? In the last release? 😅

@ramya-rao-a
Copy link
Contributor

@jpeletier "now" out for sure :)

@sebglon
Copy link

sebglon commented Nov 12, 2018

I always have this error a few time aog with Go extension(0.7.0)

4log.ts:171   ERR [UriError]: Scheme is missing: {scheme: "", authority: "", path: "_testmain.go", query: "", fragment: ""}: Error: [UriError]: Scheme is missing: {scheme: "", authority: "", path: "_testmain.go", query: "", fragment: ""}
    at file:///usr/share/code/resources/app/out/vs/workbench/workbench.main.js:125:506
    at t.e (file:///usr/share/code/resources/app/out/vs/workbench/workbench.main.js:126:340)
    at new t (file:///usr/share/code/resources/app/out/vs/workbench/workbench.main.js:127:895)
    at Function.e.parse (file:///usr/share/code/resources/app/out/vs/workbench/workbench.main.js:127:155)
    at new e (file:///usr/share/code/resources/app/out/vs/workbench/workbench.main.js:2956:631)
    at e.getSource (file:///usr/share/code/resources/app/out/vs/workbench/workbench.main.js:2973:602)
    at file:///usr/share/code/resources/app/out/vs/workbench/workbench.main.js:2572:367
    at Array.map (<anonymous>)
    at e.getCallStackImpl.t.session.stackTrace.then.n.stoppedDetails.n.stoppedDetails.framesErrorMessage (file:///usr/share/code/resources/app/out/vs/workbench/workbench.main.js:2572:333)
    at Object.g [as _notify] (file:///usr/share/code/resources/app/out/vs/workbench/workbench.main.js:160:729)
    at Object.enter (file:///usr/share/code/resources/app/out/vs/workbench/workbench.main.js:164:61)
    at n.Class.derive._oncancel._run (file:///usr/share/code/resources/app/out/vs/workbench/workbench.main.js:165:902)
    at n.Class.derive._oncancel._completed (file:///usr/share/code/resources/app/out/vs/workbench/workbench.main.js:165:343)
    at file:///usr/share/code/resources/app/out/vs/workbench/workbench.main.js:2605:843
    at t.e.acceptMessage (file:///usr/share/code/resources/app/out/vs/workbench/workbench.main.js:2609:49)
    at t.handleData (file:///usr/share/code/resources/app/out/vs/workbench/workbench.main.js:2610:155)
    at Socket.<anonymous> (file:///usr/share/code/resources/app/out/vs/workbench/workbench.main.js:2609:643)
    at emitOne (events.js:116:13)
    at Socket.emit (events.js:211:7)
    at addChunk (_stream_readable.js:263:12)
    at readableAddChunk (_stream_readable.js:250:11)
    at Socket.Readable.push (_stream_readable.js:208:10)
    at Pipe.onread (net.js:594:20)

@sebglon
Copy link

sebglon commented Nov 12, 2018

And on my call stack i can see an error
show the screenshot: https://drive.google.com/file/d/1lNkqvvbRSINMr5IOSR07TvDJO20u9-Ui/view?usp=sharing

@sebglon
Copy link

sebglon commented Nov 12, 2018

This not work on main vscode version
and the same on the latest inside:
Version: 1.29.0-insider
Commit: 5f24c93878bd4bc645a4a17c620e2487b11005f9
Date: 2018-11-10T00:29:18.485Z
Electron: 2.0.12
Chrome: 61.0.3163.100
Node.js: 8.9.3
V8: 6.1.534.41
Architecture: x64

with this error:

workbench.main.js:sourcemap:294 [IPC Library: File Watcher (nsfw)] Unhandled Promise Rejection:  Error: Path must be a valid path to a file or a directory.
    at /usr/share/code-insiders/resources/app/node_modules.asar/vscode-nsfw/lib/src/index.js:79:11
    at <anonymous>
t.log @ workbench.main.js:sourcemap:294
workbench.main.js:sourcemap:1446  INFO no standard startup: not a new window
2workbench.main.js:sourcemap:294 [Extension Host] Error when running go env GOMOD: Error: spawn /usr/local/go/bin/go ENOENT (at cp.execFile (/home/sebglon/.vscode-insiders/extensions/ms-vscode.go-0.7.0/out/src/goModules.js:17:25))
t.log @ workbench.main.js:sourcemap:294

@ramya-rao-a
Copy link
Contributor

ramya-rao-a commented Nov 14, 2018

@sebglon The errors you are seeing are not related to the current issue. Please log a new issue with these details along with a sample code where you see the issue

@microsoft microsoft locked as resolved and limited conversation to collaborators Nov 14, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants