Just been reading this article from Scott Allen.
The approach to specify command line arguments to .net core seems intersing, but how do we pass those arguments from VS Code when running with debugger (Normally using F5 command if launch.json is setup)?
e.g dotnet run dropdb migratedb seeddb
Copying over answer from comment
Note:
launch.json
is found in the.vscode
folder under your project.In your
launch.json
, try adding:to the target launch configuration.
Providing Context Inside launch.json
Your
launch.json
will contain an emptyargs
element by default which looks something like: