vscode-cpptools icon indicating copy to clipboard operation
vscode-cpptools copied to clipboard

cppvsdbg ignores prelaunchTask errors

Open huwpascoe opened this issue 2 years ago • 1 comments

Environment

  • OS and version: Windows 10
  • VS Code: 1.70.2
  • C/C++ extension: 1.11.4

Bug Summary and Steps to Reproduce

Bug Summary: Launch configuration using "cppvsdbg" ignores "prelaunchTask" return codes and problems. Starting the task regardless of failure.

Steps to reproduce:

  • Create a launch configuration with a "preLaunchTask" set.
  • Run the launch configuration
  • Even if the preLaunchTask exit code is not 0 and/or problemMatcher detects problems, the application is still launched.

Debugger Configurations

{
            "name": "Test",
            "type": "cppvsdbg",
            "request": "launch",
            "program": "${workspaceFolder}/build/test/Debug/test.exe",
            "args": [],
            "preLaunchTask": "build test",
            "cwd": "${fileDirname}",
            "environment": [],
            "console": "externalTerminal"
        }

		{
			"type": "cmake",
			"label": "build test",
			"command": "build",
			"group": {
				"kind": "build",
				"isDefault": true
			},
			"problemMatcher": "$msCompile",
			"presentation": {
				"revealProblems": "onProblem",
				"panel": "shared",
				"showReuseMessage": false,
				"clear": true
			}
		}

Debugger Logs

C:\src\test\main.cpp(1,1): error Cxxxx: ...
[C:\src\test\build\test\test.vcxproj]
Build finished with error(s).

Other Extensions

No response

Additional Information

No response

huwpascoe avatar Aug 26 '22 19:08 huwpascoe

Can you please file an issue on https://github.com/microsoft/vscode since they are still starting up the debugging process when the preLauncTask failed?

WardenGnaw avatar Aug 26 '22 20:08 WardenGnaw