Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 863
negstek Avatar asked May 22 '26 14:05

negstek


1 Answers

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"
}
like image 57
Mark Avatar answered May 25 '26 06:05

Mark



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!