Visual Studio Code launch can't find custom prelaunch task
See original GitHub issueType: Bug
I’ve defined a task is tasks.json, in the .vscode folder, alongside the launch.json file. I added a reference to that task (using the task’s label) in the preLaunchTask attribute of the launch configuration, but when I execute that launch configuration VS Code says
[Window Title] Visual Studio Code [Content] Could not find the specified task. [ ] Remember my choice for this task [Debug Anyway] [Configure Task] [Cancel]
If I click Configure Task, I can see the task listed in the drop-down menu. Is there any way to debug the “prelaunch process”? I able to run the task manually from the Terminal Run Task… menu and it works correctly. Happy to include the launch.json and tasks.json upon request.
I tried both in the most recent version of VS Code
Version: 1.70.1 (user setup) Commit: 6d9b74a70ca9c7733b29f0456fd8195364076dda Date: 2022-08-10T06:08:33.642Z Electron: 18.3.5 Chromium: 100.0.4896.160 Node.js: 16.13.2 V8: 10.0.139.17-electron.0 OS: Windows_NT x64 10.0.22000
and in the version I generated this bug from
VS Code version: Code - Insiders 1.71.0-insider (ef65ac1ba57f57f2a3961bfe94aa20481caca4c6, 2022-08-11T05:16:46.298Z) OS version: Windows_NT x64 10.0.22000 Modes: Sandboxed: Yes
System Info
Item | Value |
---|---|
CPUs | Intel® Core™ i9-10900K CPU @ 3.70GHz (20 x 3696) |
GPU Status | 2d_canvas: enabled canvas_oop_rasterization: disabled_off direct_rendering_display_compositor: disabled_off_ok gpu_compositing: enabled multiple_raster_threads: enabled_on opengl: enabled_on rasterization: enabled raw_draw: disabled_off_ok skia_renderer: enabled_on video_decode: enabled video_encode: enabled vulkan: disabled_off webgl: enabled webgl2: enabled webgpu: disabled_off |
Load (avg) | undefined |
Memory (System) | 31.72GB (16.58GB free) |
Process Argv | |
Screen Reader | no |
VM | 0% |
A/B Experiments
vsliv695:30137379
vsins829:30139715
vsliv368:30146709
vsreu685:30147344
python383cf:30185419
vspor879:30202332
vspor708:30202333
vspor363:30204092
vswsl492cf:30256198
vstes627:30244334
vslsvsres303:30308271
pythonvspyl392:30422396
pythontb:30258533
pythonvspyt551:30291412
pythonptprofiler:30281269
vshan820:30294714
pythondataviewer:30285072
vscod805:30301674
bridge0708:30335490
bridge0723:30353136
cmake_vspar411cf:30542925
vsaa593:30376534
pythonvs932:30404738
wslgetstarted:30449409
cppdebug:30492333
pylanb8912:30522163
vsclangdf:30492506
c4g48928:30535728
dsvsc012:30540252
Issue Analytics
- State:
- Created a year ago
- Comments:7 (3 by maintainers)
Top GitHub Comments
I decided to try to create a minimal repro, and in so doing I found that the problem seems to be that VS Code (intellisense?) suggests two things for prelaunchTask And for some reason I chose to try
{"task": "taskLabel", "type": "shell"}
which doesn’t work, butprelaunchTask: "taskLabel"
does work.Docs for launch configuration do state this, implicitly… My problem has been solved but I think the intellisense needs to be fixed (not sure where it comes from).
Thanks for investigating and for the info. i’ll definitely fix that this iteration