Skip to content

Conversation

@afterxleep
Copy link
Contributor

@afterxleep afterxleep commented Apr 30, 2025

⚠️ DRAFT: This PR includes changes from #138, which needs to be merged first.

Description

Very often, VSCode does not always stop the debug session when a preLaunchTask fails, even if configured to do so. It may continue to start the debug server, lingering around using 100% CPU until the user manually interrupts the debug session.

Screenshot 2025-05-01 at 01 18 42

What Changed

This change checks for xcodebuild task failures, displays a "Build failed" message, and immediately stops the debug session.

How to test

  • Update a test project so build fails
  • Run the debugger
  • Confirm the debug session is immediately stopped after build fails and you get a notification
  • debugserver process should not be present In Activity Monitor

@afterxleep
Copy link
Contributor Author

@hyzyla this is an important fix as it severely impacts battery life and performance. (multiple debugserver processes can end up clogging the CPU)

@afterxleep
Copy link
Contributor Author

I just noticed this issue is more evident if you have VSCode setup to try attach to the debugger even if there are tasks failrues. Leaving it as a draft as it's worth more testing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant