Comments (10)
Will take a look, thank you
from rules_ios.
Hi all! This is working for me, if I do the following:
bazelisk run tests/ios/xcodeproj:Test-With-Host-App --@build_bazel_rules_ios//rules:local_debug_options_enabled
open tests/ios/xcodeproj/TestWithHostApp.xcodeproj
- Set a break point on line 5 of empty.swift where the EmptySwiftTests class is defined.
- Select the ExplicitHosted scheme
- Run Cmd+U.
My breakpoint gets hit.
Note that I do not need to disable sandbox mode anymore. I think there have been some changes to this repo since October that may have fixed the issue. I'm using Xcode 11.6 on BigSur (Mac OS v11.0.1).
I'm also able to hit breakpoints in main.m when I run the iOS-9.3-AppHost scheme. Perhaps #127 made a difference here? In any case, this issue is not happening anymore.
from rules_ios.
Hi all. It looks like there is an issue with sandboxing is not enabled. Thanks for reporting the issue, apologies for closing it too early.
Furthermore, when you change the sandbox flag (i.e. turn it on or off), you must then close Xcode, run bazelisk clean && bazelisk run tests/ios/xcodeproj:Test-With-Host-App
and then reopen the project again. So it seems like there is some lingering state!
In order to get breakpoints to work, you should:
- Close Xcode
- Comment out these lines in .bazelrc:
# build --genrule_strategy=standalone
# build --spawn_strategy=standalone
- Call
bazelisk clean
- Call
bazelisk run tests/ios/xcodeproj:Test-With-Host-App
- Reopen xcode.
- Set a break point on line 5 of empty.swift where the EmptySwiftTests class is defined
- Select the ExplicitHosted scheme
- Run Cmd+U
from rules_ios.
Hey, I am trying to get breakpoints working on Xcode while using the xcodeproj
rule. What I did:
- I pulled rules_ios to the most updated commit, containing #119
- I added the following to my
bazel.rc
file:
build --genrule_strategy=standalone
build --spawn_strategy=standalone
build --compilation_mode=dbg
But I cant get it to work. Are there any other steps required? 🤔
EDIT:
I tried also with the examples of this repo:
- Cloned the latest commit from this repo
- Removed the comments for the following lines in the
.bazelrc
file:
build --genrule_strategy=standalone
build --spawn_strategy=standalone
- Opened
tests/ios/xcodeproj/TestWithHostApp.xcodeproj
- Added a breakpoint in line 5 of
EmptySwiftTests.swift
- Run the tests: do
CMD+U
in theExplicitHosted
scheme of the project
Result: breakpoint did not stop the execution
from rules_ios.
@amberdixon We tried the same setup steps as @acecilia and also reproduced the same result: we did not hit a local breakpoint when set in Xcode 11. Were you able to reproduce @acecilia's issue?
We would be happy to help investigate / fix if possible, but don't want to duplicate any investigative work that you have already done on this issue.
from rules_ios.
@amberdixon could you give an update on this? 🙏
What is the status of breakpoints? Are they supposed to work and I have some faulty configuration, or are they not working?
from rules_ios.
@amberdixon I just followed your steps but on Xcode 12.3 and 12.2 and can't make breakpoints work. Then I was wondering is it anywhere stated here that these rules only work with Xcode 11.x ? cc @segiddins
from rules_ios.
They should work equally well on 11 and 12
from rules_ios.
@segiddins I was following exactly the steps as above and I can't seem to get breakpoints working. Do you have any advice how to debug this? I would be happy to investigate it.
from rules_ios.
Same here, cant get the breakpoint to work 😢 . Followed these steps:
rm -rf tests/ios/xcodeproj/TestWithHostApp.xcodeproj
bazelisk run tests/ios/xcodeproj:Test-With-Host-App --@build_bazel_rules_ios//rules:local_debug_options_enabled
- Check that git is clean: it is
open tests/ios/xcodeproj/TestWithHostApp.xcodeproj
- Set a break point on line 5 of
empty.swift
where theEmptySwiftTests
class is defined - Select the ExplicitHosted scheme
- Run
Cmd+U
The breakpoint does not stop execution of the test.
Running on:
- Catalina 10.15.7
- Xcode Version 12.3 (12C33)
- Latest commit from this repository:
20d809d07f3c9db4887049efedd6a47a749400dd
- Simulator: iPhone 8 iOS 14.3
I also run on code 11.6 with same results. I am bit puzzled at this point, only difference I see with @amberdixon is Catalina VS bigSur
from rules_ios.
Related Issues (20)
- [m1] arm64 automatic device dep simulator rules not working with RBE or caching
- `apple_framework_packing` with `link_dynamic=true` will cause error HOT 7
- Feature request: Add support for Bzlmod HOT 14
- Bug: Prebuilt XCFramework errors at `import` statements
- `bazel build //tests/ios/xcframeworks/Basic:xcframeworks` is failing HOT 2
- Bug : Build fails when depending on XCFrameworks generated by cocoapods-bazel HOT 1
- Bug - Build fails while building FirebaseCrashlytics Pod using cocoapods-bazel HOT 7
- Error: create_swift_module() got unexpected keyword argument: symbol_graph HOT 1
- `ctx.attr._product_type` always being set to `apple_product_type.static_framework` in `apple_framework_packaging` HOT 6
- Proposal - Move the Xcode project rules into a separate repository HOT 6
- Feature Request - Migrate to `CcInfo` instead of `ObjcProvider` for Objective-C linking HOT 1
- if i want to generated helloword Xcode project using rules_xcodeproj instead of Tulsi , what should be done ? HOT 6
- `precompiled_apple_resource_bundle` still requires `common_tool_attributes` that's not exist in `rules_apple` newest version HOT 5
- Cannot use latest rules_ios - missing arm64-to-sim, other dep errors HOT 2
- Issues w/stardoc + bzlmod: currently runnning stardoc w/o bzlmod HOT 3
- Linker warnings from version mismatches
- Rename `master` to `main`
- Add support for Bazel 7 HOT 16
- precompiled_apple_resource_bundle causing AppStore rejection HOT 13
- XCUITest and XCTest did not run HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rules_ios.