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

How do I pass arguments when I use vscode to debug a go program #1067

Closed
gotoxu opened this issue Jul 4, 2017 · 2 comments
Closed

How do I pass arguments when I use vscode to debug a go program #1067

gotoxu opened this issue Jul 4, 2017 · 2 comments

Comments

@gotoxu
Copy link

gotoxu commented Jul 4, 2017

My go program needs to receive the arguments passed from the command line. How do I pass these args when I debug in vscode?

Like this: goapp -k1=v1 -k2=v2

@ramya-rao-a
Copy link
Contributor

Have you created debug configuration in the launch.json file?

One of the fields in the debug configuration is "args" which you can use to pass the arguments

@gotoxu
Copy link
Author

gotoxu commented Jul 5, 2017

I found answer in this issue

Anyway, thank you.

@gotoxu gotoxu closed this as completed Jul 5, 2017
@vscodebot vscodebot bot locked and limited conversation to collaborators Jan 23, 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

2 participants