Add ability to collect launch information from bazel run#2774
Merged
brentleyjones merged 2 commits intomasterfrom Sep 5, 2025
Merged
Conversation
By specifying a path with `BAZEL_APPLE_LAUNCH_INFO_PATH`, `bazel run` of an application will write the following newline-separated information to that file: * The string `device` if running on a device, otherwise the lldb platform (e.g. `ios-simulator`). * The UDUD of the device. * The PID of the launched application. This information can be used to attach `lldb` to the running application. Since `devicectl` waits until the process exists before writing to `--json_output`, you’ll need to use `BAZEL_DEVICECTL_LAUNCH_FLAGS` to not use `--console`. Signed-off-by: Brentley Jones <[email protected]>
Collaborator
Author
|
Maybe the format of the file should be json, to allow us to add more to it in the future? Edit: Yeah, going to do that. |
Signed-off-by: Brentley Jones <[email protected]>
luispadron
approved these changes
Sep 5, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
By specifying a path with
BAZEL_APPLE_LAUNCH_INFO_PATH,bazel runof an application will write the following JSON to that file:platform: The stringdeviceif running on a device, otherwise the lldb platform (e.g.ios-simulator).udid: The UDID of the device.pid: The PID of the launched application.This information can be used to attach
lldbto the running application.Since
devicectlwaits until the process exists before writing to--json_output, you’ll need to useBAZEL_DEVICECTL_LAUNCH_FLAGSto not use--console.