{"action":"created","issue":{"url":"https://api.github.com/repos/Microsoft/vscode-go/issues/1341","repository_url":"https://api.github.com/repos/Microsoft/vscode-go","labels_url":"https://api.github.com/repos/Microsoft/vscode-go/issues/1341/labels{/name}","comments_url":"https://api.github.com/repos/Microsoft/vscode-go/issues/1341/comments","events_url":"https://api.github.com/repos/Microsoft/vscode-go/issues/1341/events","html_url":"https://github.com/Microsoft/vscode-go/issues/1341","id":274062465,"number":1341,"title":"Debug console does not show test failure and associated panic","user":{"login":"jpap","id":343842,"avatar_url":"https://avatars2.githubusercontent.com/u/343842?v=4","gravatar_id":"","url":"https://api.github.com/users/jpap","html_url":"https://github.com/jpap","followers_url":"https://api.github.com/users/jpap/followers","following_url":"https://api.github.com/users/jpap/following{/other_user}","gists_url":"https://api.github.com/users/jpap/gists{/gist_id}","starred_url":"https://api.github.com/users/jpap/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jpap/subscriptions","organizations_url":"https://api.github.com/users/jpap/orgs","repos_url":"https://api.github.com/users/jpap/repos","events_url":"https://api.github.com/users/jpap/events{/privacy}","received_events_url":"https://api.github.com/users/jpap/received_events","type":"User","site_admin":false},"labels":[{"id":443923947,"url":"https://api.github.com/repos/Microsoft/vscode-go/labels/debug","name":"debug","color":"fbca04","default":false},{"id":273065551,"url":"https://api.github.com/repos/Microsoft/vscode-go/labels/enhancement","name":"enhancement","color":"84b6eb","default":true},{"id":273065552,"url":"https://api.github.com/repos/Microsoft/vscode-go/labels/help%20wanted","name":"help wanted","color":"159818","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2017-11-15T07:43:56Z","updated_at":"2017-11-18T01:12:11Z","closed_at":null,"author_association":"NONE","body":"When running tests on the command line:\r\n```\r\n$ go test -v lib/my/package\r\n=== RUN   Test1\r\n--- PASS: Test1 (0.00s)\r\n=== RUN   Test2\r\n--- FAIL: Test2 (0.00s)\r\n        my_test.go:17: oops, something went wrong.\r\npanic: runtime error: invalid memory address or nil pointer dereference [recovered]\r\n        panic: runtime error: invalid memory address or nil pointer dereference\r\n[signal SIGSEGV: segmentation violation code=0x1 addr=0xb0 pc=0x424fb06]\r\n\r\ngoroutine 20 [running]:\r\ntesting.tRunner.func1(0xc4201241e0)\r\n        /usr/local/Cellar/go/1.9.2/libexec/src/testing/testing.go:711 +0x2d2\r\npanic(0x4297920, 0x446a7c0)\r\n        /usr/local/Cellar/go/1.9.2/libexec/src/runtime/panic.go:491 +0x283\r\nlib/my/package.Test2(0xc4201241e0)\r\n        /Users/jpap/PROJECT/.gopath~/src/lib/my/package/my_test.go:19 +0x151\r\ntesting.tRunner(0xc4201241e0, 0x42fe350)\r\n        /usr/local/Cellar/go/1.9.2/libexec/src/testing/testing.go:746 +0xd0\r\ncreated by testing.(*T).Run\r\n        /usr/local/Cellar/go/1.9.2/libexec/src/testing/testing.go:789 +0x2de\r\nexit status 2\r\nFAIL    lib/my/package  0.017s\r\n$\r\n```\r\n\r\nBut when running under the debugger, even with full verbosity:\r\n```\r\nVerbose logs are written to:\r\n/var/folders/wc/jkc42h512cv0n1tdp51yjp7w0000gq/T/vscode-go-debug.txt\r\n23:35:52, 2017-11-14\r\nInitializeRequest\r\nInitializeResponse\r\nUsing GOPATH: /Users/jpap/PROJECT/.gopath~:/Users/jpap/PROJECT/vendor\r\nRunning: /usr/local/bin/dlv test --headless=true --listen=127.0.0.1:2346 --log=true -- -test.v\r\n2017/11/14 23:36:00 server.go:73: Using API v1\r\n2017/11/14 23:36:00 debugger.go:97: launching process with args: [./debug.test -test.v]\r\nAPI server listening at: 127.0.0.1:2346\r\nInitializeEvent\r\nConfigurationDoneRequest\r\nContinueRequest\r\nContinueResponse\r\nThreadsRequest\r\n2017/11/14 23:36:00 debugger.go:499: continuing\r\n=== RUN   Test1\r\n--- PASS: Test1 (0.00s)\r\n=== RUN   Test2\r\nFailed to continue.\r\ncontinue state null\r\n```\r\n\r\nIt would be nice if we could see the panic, stack trace, the final `FAIL` log item, and error message in the VSC debug console (and without having to use the `showLog` or `trace` launch configuration options)."},"comment":{"url":"https://api.github.com/repos/Microsoft/vscode-go/issues/comments/345406075","html_url":"https://github.com/Microsoft/vscode-go/issues/1341#issuecomment-345406075","issue_url":"https://api.github.com/repos/Microsoft/vscode-go/issues/1341","id":345406075,"user":{"login":"jpap","id":343842,"avatar_url":"https://avatars2.githubusercontent.com/u/343842?v=4","gravatar_id":"","url":"https://api.github.com/users/jpap","html_url":"https://github.com/jpap","followers_url":"https://api.github.com/users/jpap/followers","following_url":"https://api.github.com/users/jpap/following{/other_user}","gists_url":"https://api.github.com/users/jpap/gists{/gist_id}","starred_url":"https://api.github.com/users/jpap/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jpap/subscriptions","organizations_url":"https://api.github.com/users/jpap/orgs","repos_url":"https://api.github.com/users/jpap/repos","events_url":"https://api.github.com/users/jpap/events{/privacy}","received_events_url":"https://api.github.com/users/jpap/received_events","type":"User","site_admin":false},"created_at":"2017-11-18T01:12:11Z","updated_at":"2017-11-18T01:12:11Z","author_association":"NONE","body":"Place this is a test file...\r\n```\r\nfunc TestPanic(t *testing.T) {\r\n\tpanic(\"I survived Timmy O'Toole getting trapped in a well... or did I?\")\r\n}\r\n```\r\n\r\nWhen trying it out today, I see the debugger is stopping at `runtime.startpanic()`, whereas before it did not... if you can't reproduce it, please go ahead and close this item.  It may very well be because of a dud-version of Delve that I may have been using for a short while.  Thanks for following up.\r\n\r\nWith the debugger stopped at `startpanic`, I can see the stack trace and it provides a good way to debug panics further."}}
{"actor":{"display_login":"jpap"}}