Git Product home page Git Product logo

Comments (8)

keith avatar keith commented on June 28, 2024

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.

hoang-tran avatar hoang-tran commented on June 28, 2024

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.

gfontenot avatar gfontenot commented on June 28, 2024

@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.

keith avatar keith commented on June 28, 2024

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.

gfontenot avatar gfontenot commented on June 28, 2024

seems reasonable

from vim-xcode.

gfontenot avatar gfontenot commented on June 28, 2024

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.

gfontenot avatar gfontenot commented on June 28, 2024

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.

keith avatar keith commented on June 28, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.