-
Notifications
You must be signed in to change notification settings - Fork 77
debugger: pass along SDKROOT
for the launch of the debugger
#275
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
Conversation
This shouldn't be necessary as tests/applications inherit their environment from their parent process ie vscode. Is this really all that is needed to resolve launching with the swift LLDB? It doesn't make sense |
Is |
Yes, with this and the other change, I’m able to get lldb to run with the Swift liblldb.
What do you mean by custom host SDK? |
Custom
Since we’re debugging the target executable, I don’t think we should pass |
Which other change is that? The setting of the xctest.dll path? #276 |
The change to remove the "do not launch lldb on Windows" check. |
Ah, having the ability to specify the SDKROOT instead of relying on the environment is definitely a good thing to have.
I'm not sure that there is value here. While I would certainly like to have different SDKs, the Android SDK is currently not in a state where packaging is reasonable. The Android build is now "broken" - it has conflated Android and termux and this will need to be cleaned up. Even when the Android SDK is available, we will need additional environment variables (e.g. Furthermore, if
Yes, the value that should be set is the host SDK path. |
oh ok. You didn't need to add any lldb commands into the launch.json? |
Well, that's the thing that I think that @stevapple and I were discussing above. I think that @stevapple would prefer that we don't use the environment ... and in principle I agree with that. I don't like the environment approach either. I would prefer that we uncomment https://github.com/swift-server/vscode-swift/pull/275/files#diff-48e8c0b41f2583e0ffbaf19954e30331945a5731890f0a3af3f975b18e0f154eR174 and remove the environment variable. The problem is that I don't understand how the LLDB plugin functions and I don't know if we need to worry about ordering of commands if the user wants to add custom ones. If someone knows if it is safe to inject this and it will auto-merge the user specified settings, then I think that is a better solution. Then, once we have the ability to specify the SDKROOT as a setting in VSCode, we should change this to pipe that value through rather than the environment variable. |
We're only updating the launch config in very limited situations (mainly on configuration changes), so I guess we can assume this is relatively safe to cover (with prompt on users). We cannot use Swift plugin configuration in |
There is a difference between the launch configuration generation and usage for debugging/running tests and debugging applications.
This PR only updates the test launch config. I guess it will also need to update the application launch configs, where it can use a power shell env var. I think I would prefer the lldb command route as well. @compnerd Out of interest is there any difference to using |
I think that we are talking about different things. I am talking about the merging of the commands for the LLDB plugin. In the CodeLLDB plugin settings, you can define a set of items for them. I don't know how they interact with the overridden values here.
Yes, there is a big difference and why I use the |
I did think about using the settings (it is cleaner, if those settings are static) but if we have an editable SDKROOT it might be awkward to keep the lldb settings in-sync |
The |
2fbfe8a
to
2ae2335
Compare
This is used by the debugger to locate the Swift module information for the debugger. Without this, we would fail to setup the Swift scratch space in LLDB, which then results in the failure of the debugger and subsequently the DAP. Fixes: swiftlang#250
This is used by the debugger to locate the Swift module information for
the debugger. Without this, we would fail to setup the Swift scratch
space in LLDB, which then results in the failure of the debugger and
subsequently the DAP.
Fixes: #250