-
Notifications
You must be signed in to change notification settings - Fork 30.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
preLaunchTask fails (non zero exit code) but launch proceeds #141654
Comments
@devzeb By using a "fake build task" that always returns the exit code 1, I can prove that VS Code honours the exit code correctly: What does this mean for your case? There are two possibilities:
|
Having the fake build task as you showed in your example makes my launch fail as well. I added "debug.onTaskErrors": "abort" to check if that was a problem. The build task I'm using is the exact task of this official tutorial: https://code.visualstudio.com/docs/cpp/config-mingw It looks like this: tasks.json
launch.json
|
@devzeb you said:
Since I'm using macOS I don't know whether a non-zero exit code should really result in "False". And if this is not the problem then maybe there is an issue with the "$gcc" problem matcher. I suggest to file an issue against the C/C++ extension (which defines the build task and the problem matcher). |
/extCpp |
Does this issue occur when all extensions are disabled?: Yes
Steps to Reproduce:
I can't understand why this most basic workflow just doesn't work.
Debugging an outdated executable is just a pain to deal with.
If you run the build command in powershell (which is displayed when pressing Ctrl+Shift+B) and run $? directly after, you see that powershell returns False, so it recognises that the build fails.
cpp_test_project.zip
That means the issue has to be VSCode.
I attached a workspace which contains a minimal example.
The text was updated successfully, but these errors were encountered: