Repository: vscode
Issue: Background task problem matcher does not show all problems
Labels: bug,help wanted,tasks,confirmed

Type: <b>Bug</b>

This background task problem matcher shows only 2 problems:

    {
        "label": "background",
        "group": "test",
        "type": "shell",
        "command": "cat data.txt",
        "isBackground": true,
        "problemMatcher": {
            "owner": "Unit tests",
            "fileLocation": "relative",
            "pattern": {
                "regexp": "^(.*):(\\d+):\\s+([^:]+):\\s+(.*)$",
                "file": 1,
                "line": 2,
                "severity": 3,
                "message": 4
            },
            "background": {
                "activeOnStart": true,
                "beginsPattern": "Start",
                "endsPattern": "End"
            }
        },
    }

data.txt:

    Start
    file:150: fatal error: problem1
    file:825: fatal error: problem2
    file2:468: fatal error: problem3
    file2:550: fatal error: problem4
    End


If make task non-background, problem matcher displays 4 problems.

VS Code version: Code 1.77.1 (b7886d7461186a5eac768481578c1d7ca80e2d21, 2023-04-04T23:21:11.906Z)
OS version: Windows_NT x64 10.0.19045
Modes:
Sandboxed: Yes
Remote OS version: Linux x64 5.15.90.1-microsoft-standard-WSL2

<details>
<summary>System Info</summary>

|Item|Value|
|---|---|
|CPUs|Intel(R) Core(TM) i5 CPU         750  @ 2.67GHz (4 x 2660)|
|GPU Status|2d_canvas: unavailable_software<br>canvas_oop_rasterization: disabled_off<br>direct_rendering_display_compositor: disabled_off_ok<br>gpu_compositing: disabled_software<br>multiple_raster_threads: enabled_on<br>opengl: disabled_off<br>rasterization: disabled_software<br>raw_draw: disabled_off_ok<br>skia_renderer: enabled_on<br>video_decode: disabled_software<br>video_encode: disabled_software<br>vulkan: disabled_off<br>webgl: unavailable_software<br>webgl2: unavailable_software<br>webgpu: disabled_off|
|Load (avg)|undefined|
|Memory (System)|15.99GB (5.52GB free)|
|Process Argv|--disable-extensions --folder-uri=vscode-remote://wsl+Ubuntu-22.04/home/developer/VsCodeProject --remote=wsl+Ubuntu-22.04 --crash-reporter-id c52deec0-35bf-4d6f-82e4-165e6027de16|
|Screen Reader|no|
|VM|0%|

|Item|Value|
|---|---|
|Remote|WSL: Ubuntu-22.04|
|OS|Linux x64 5.15.90.1-microsoft-standard-WSL2|
|CPUs|Intel(R) Core(TM) i5 CPU         750  @ 2.67GHz (4 x 2659)|
|Memory (System)|4.81GB (3.95GB free)|
|VM|0%|
</details>Extensions disabled<details>
<summary>A/B Experiments</summary>

```
vsliv368:30146709
vsreu685:30147344
python383cf:30185419
vspor879:30202332
vspor708:30202333
vspor363:30204092
vslsvsres303:30308271
vserr242cf:30382550
pythontb:30283811
vsjup518:30340749
pythonptprofiler:30281270
vshan820:30294714
vstes263:30335439
vscoreces:30445986
pythondataviewer:30285071
vscod805cf:30301675
binariesv615:30325510
bridge0708:30335490
bridge0723:30353136
cmake_vspar411:30581797
vsaa593cf:30376535
pythonvs932:30410667
cppdebug:30492333
vsclangdc:30486549
c4g48928:30535728
dsvsc012:30540252
pynewext54:30695312
azure-dev_surveyone:30548225
nodejswelcome1:30587005
2e4cg342:30602488
pyind779:30671433
f6dab269:30613381
pythonsymbol12:30671437
vsctsb:30705553
functionswalk:30687959
pythonms35:30701012
pythonclientmvcf:30705674
f8hc8238:30694864

```

</details>

<!-- generated by issue reporter -->