-
-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use lldb
to launch macOS applications
#50
Use lldb
to launch macOS applications
#50
Conversation
Sorry for the previous PR originally I thought the issue was a code-signing one and went down a rabbit hole. This fix is much simpler and directly fixes my issues. |
Only, problem I'm seeing with this is that we lose the stderr and stdout. I could open the executable directly instead of app bundle and this would open an external terminal session which would show stdout and stderr but this isn't a nice solution as it takes you out of vscode. |
This change uses lldb to launch and debug the app, this also has the benifit of launching the app with full entitlements. It also mirros the Xcode Run action which builds, runs and attaches the debugger.
Ok, one solution that works is to use I would also suggest the same is done for apps running in the iOS simulator. Having to run and then later attach the debugger is problematic for debugging events that happen at launch time. However this PR doesn't make that change. |
open
instead of executing from the editorlldb
to launch macOS applications
lldb
to launch macOS applicationslldb
to launch macOS applications
For some reason, the version with the LLDB debugger doesn't work for me. Maybe I should give it a chance tomorrow. Also, I’ve found a way to redirect stdout, but I haven't tried how it would work in vscode: open -W --stdout $(tty) /Users/hyzyla/Library/Developer/Xcode/DerivedData/ControlRoom-gdvrildvemgjaiameavxoegdskby/Build/Products/Debug/Control\ Room.app/ |
That's interesting, I personally like the launching with debug session option as this not only fixes the issues I was having it's also representative to how Xcode works when running the app. It always starts a debug session, this was already a pain point for me using this library having to manually attach the debugger. @hyzyla what error did you see when trying to launch the app using lldb? |
This looks like a great quick fix, maybe we could add new build options (run with debugger) and run (without debugging) that way we can choose. |
I am going to close this, for now, will have another PR up shortly that doesn't break existing functionality |
Fixes #47