negstek
negstek

Reputation: 691

post launch task in visual studio code

I can launch task before debug my node app in vscode with preLaunchTask arg in launch.json but I can't find a way to launch task after the debug. Is there a way to do this in vscode like with the preLaunchTask?

Upvotes: 9

Views: 6333

Answers (1)

Mark
Mark

Reputation: 180785

v1.22 just added a postDebugTask , release notes: postDebugTask.

We have added postDebugTask support in launch.json. This task is run after a debug session finishes. Similar to preLaunchTask, you can reference tasks in your tasks.json by a name. Here's an example of a launch configuration using a postDebugTask:

{
    "name": "Attach to node server",
    "type": "node",
    "request": "attach",
    "port": 8008,
    "preLaunchTask": "Start Server",
    "postDebugTask": "Your delete task here"
}

Upvotes: 9

Related Questions