Enable debugger for tests on macOS#446
Enable debugger for tests on macOS#446openshift-merge-bot[bot] merged 1 commit intocontainers:mainfrom
Conversation
793cc85 to
5c0419d
Compare
@lstocchi No, this PR enables ability to debug |
5c0419d to
40cadec
Compare
|
Launch configuration for VSCode: {
"name": "Connect to server",
"type": "go",
"request": "attach",
"mode": "remote",
"remotePath": "${workspaceFolder}",
"port": 2345,
"host": "localhost"
} |
lstocchi
left a comment
There was a problem hiding this comment.
Unfortunately I was not able to still test it on vscode (I only have that). Added some comments in the meantime.
|
|
||
| // #nosec | ||
| host = exec.Command(filepath.Join(binDir, "gvproxy"), fmt.Sprintf("--ssh-port=%d", sshPort), fmt.Sprintf("--listen=unix://%s", sock), fmt.Sprintf("--listen-vfkit=unixgram://%s", vfkitSock)) | ||
| _ = os.Remove(vfkitSock) |
There was a problem hiding this comment.
I wonder if we should remove the _ = os.Remove(sock) and _ = os.Remove(vfkitSock) in favor of clear()
DEVELOPMENT.md
Outdated
|
|
||
| #### MacOS | ||
|
|
||
| You could debug test with [Delve](https://github.com/go-delve/delve) debugger. |
There was a problem hiding this comment.
Should we mention that delve should be in $PATH?
40cadec to
fe92f93
Compare
lstocchi
left a comment
There was a problem hiding this comment.
Tested on Vscode and worked fine.
Maybe the only other thing I would add is a very short "how to" section for both IJ and Vscode to describe the steps to be done with the configurations.
Very short like
To debug in vscode, create a launch.json with this (copy/paste your configuration), execute make test-mac-debug in a terminal and when you see Listening for remote connections (connections are not authenticated nor encrypted) on the logs, execute the launch attach request. Now your breakpoints will hit.
Signed-off-by: Yevhen Vydolob <yvydolob@redhat.com>
fe92f93 to
9b92119
Compare
|
@lstocchi I have update the doc, with configuration steps for Goland and Vscode |
|
/lgtm |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: cfergeau, evidolob, lstocchi The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |

This PR depends on #427
For example of usage look on "DEVELOPMENT.md"