Comments (8)
I've been thinking about this lately as well. Based on this answer (which seems to be accurate), the logs are currently in ~/Library/Logs/CoreSimulator/<simulator-hash>/system.log
Based on the run script we already have the UDID for the simulator. So we could probably do something smart, especially with tmux, to spawn a new pane/window running a tail -f
to this log.
from vim-xcode.
Maybe the Xrun
command should also print out the path to ~/Library/Logs/CoreSimulator/<simulator-hash>/system.log
so we can tail
it into any terminal pane of our choice
from vim-xcode.
@keith and I have been talking about using hooks for things like this and possibly LLDB access. I wonder if something like this would work:
let g:xcode_post_run_command = "tail ~/Library/Logs/CoreSimulator/{sim-hash}/system.log"
That could be the default, but you could override it with whatever you want. We'd then just send that command to the already-defined runner command.
For now we could simply pass the sim hash, but it's possible that we could get more intricate with multiple tokens ({pid}
, {sim-hash}
, {bundle-id}
, ???). This would also mean moving the run commands to be internal instead of being sent to the runner command (because otherwise we'd have no way to know when the run command completed successfully). I'm OK with that.
from vim-xcode.
I think if we were to do something like this we'd actually need to make it an array of commands, or an array of functions. Because now we have at least 2 use cases for this that you would ideally use simultaneously
from vim-xcode.
seems reasonable
from vim-xcode.
Updating the name to track what we actually want out of this.
I'm a little worried that #69 actually complicates this a bit. Since we're now building & running, it's going to be hard to know when the run command has completed, and so it'll be hard to get the pid/simulator uuid/etc.
from vim-xcode.
I'd like to try expanding on this as outlined in here, but for now, I've opened a PR (#76) to tail the logs by default after running.
from vim-xcode.
So now with os log you can use a command with simctl in order to get live logs from the simulator. I think this is something we should just advice people to do in a separate pane, as it can be left open between runs
from vim-xcode.
Related Issues (20)
- Support multiple projects in the root directory
- Cache specified preferences somehow
- Limit `XSelectProject` autocompletion to project files
- Lowercase commands?
- Properly handle projects/workspaces with spaces in the name HOT 10
- Limit simulator autocompletion
- Error using `Xrun` HOT 2
- Vundle install error but still works HOT 4
- Add CI
- Failing to open iOS application in the simulator HOT 9
- Build and Run HOT 2
- Add note about `reattach-to-user-namespace` when trying to use `Xrun` with tmux HOT 3
- Fails to find xcproject file? HOT 4
- Xbuild report Run Script twice HOT 2
- Using AsyncRun? HOT 10
- Async support
- Add custom build/test commands by configuration HOT 4
- vim-test integration HOT 2
- Option to prefer xcproject over xcworkspace (for schemes) HOT 6
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 vim-xcode.