This repository was archived by the owner on Sep 2, 2025. It is now read-only.
forked from ajshort/vscode-ros
-
Notifications
You must be signed in to change notification settings - Fork 101
This repository was archived by the owner on Sep 2, 2025. It is now read-only.
[bug] launch.json postDebugTask does not work #1295
Copy link
Copy link
Open
Labels
ROS1bugSomething isn't workingSomething isn't workinglaunchBugs and features related to launch filesBugs and features related to launch files
Description
(Please add appropriate labels)
- Windows: Windows 11 Professional 23H2
- Linux: WSL 2.0 Ubuntu 20.04
- ROS 1: Noetic
Version of the plugin
v0.9.2
VS Code Infomation
Version: 1.91.1 (system setup)
Commit: f1e16e1e6214d7c44d078b1f0607b2388f29d729
Date: 2024-07-09T22:06:49.809Z
Electron: 29.4.0
ElectronBuildId: 9728852
Chromium: 122.0.6261.156
Node.js: 20.9.0
V8: 12.2.281.27-electron.0
OS: Windows_NT x64 10.0.22635
what is the bug
The option of postDebugTask in launch.json does not work. I have tried another debug configuration using debugpy, postDebugTask works and well done.
launch.json
{
"version": "0.2.0",
"configurations": [
{
"name": "ROS: Launch my_project",
"type": "ros",
"request": "launch",
"target": "${workspaceFolder}/src/xxxx/launch/test.launch",
"preLaunchTask": "catkin_make: build debug",
"postDebugTask": "rosnode cleanup", // << it does not work
},
{
"name": "test",
"type": "debugpy",
"program": "${file}",
"request": "launch",
"postDebugTask": "rosnode cleanup" // << it works
}
],
}task.json
{
"version": "2.0.0",
"tasks": [
{
"type": "catkin_make",
"args": [
"--directory",
"/home/xxxxx/xxxxx",
"-DCMAKE_BUILD_TYPE=Debug"
],
"problemMatcher": [
"$catkin-gcc"
],
"group": "build",
"label": "catkin_make: build debug"
},
{
"label": "rosnode cleanup",
"type": "shell",
"command": "source /opt/ros/noetic/setup.zsh && yes | rosnode cleanup",
"presentation": {
"reveal": "always",
}
}
]
}Repro steps
- Create a simple ros1 workspace and package
- add a task in task.json and add postDebugTask option in launch.json file
- Using ROS extension to debug launch file
- stop debug
expected behavior
when terminate all node it should run postDebugTask, press stop button multi times to kill.

additional context
Metadata
Metadata
Assignees
Labels
ROS1bugSomething isn't workingSomething isn't workinglaunchBugs and features related to launch filesBugs and features related to launch files