Debugging apmplanner2 in win11-wsl2-vscode

how to debug the apm-planner2 in windows11 running in wsl2 in vscode, how to setup the task.json and the launch.json for debugging when connected to pixhawk6c.