Skip to content

Passing arguments to preLaunchTask in launch.json #6061

@d0pare

Description

@d0pare

I am using launch.json to debug .Net Core Application in VS code.
Debugger configuration uses "preLaunchTask": "build" to build application before starting, but the problem is that I have several projects in my solution that I want to debug, so I have duplicated launch.json configurations for every single executable project in my solution. With this scenario build preLaunchTask is not working. I need to pass my project's directory to build task.

Is there anyway to pass arguments to preLaunchTask from launch.json?

Metadata

Metadata

Assignees

Labels

*questionIssue represents a question, should be posted to StackOverflow (VS Code)

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions