You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, the SweetPad extension doesn't support setting launch arguments and environment variables when launching apps. While the extension supports basic app launching through the sweetpad-lldb configuration type, developers need more control over the app's launch configuration for different development scenarios.
@FelixLisczyk, thank you for submitting this issue. Option 2 is definitely a great idea, but it’s likely the next step. In the new version of the extension, I’ve added launchArgs and launchEnv to task definitions and settings configurations. For your example you need to create separate task "tasks.json" and then use it as preLaunchTask in "launch.json"
./vscode/tasks.json
{"version": "2.0.0","tasks": [{"type": "sweetpad","action": "launch","problemMatcher": ["$sweetpad-watch","$sweetpad-xcodebuild-default","$sweetpad-xcbeautify-errors","$sweetpad-xcbeautify-warnings"],"label": "sweetpad: my launch",// This is the name for preLaunchTask task"detail": "Build and Launch the app","isBackground": true,"launchArgs": ["-skipOnboarding","-unlockFeatureX"],"launchEnv": {"OS_ACTIVITY_MODE": "disable","OTHER_VAR": "value"}}]}
./vscode/launch.json
{"version": "0.2.0","configurations": [{"type": "sweetpad-lldb","request": "launch","name": "Attach to running app (SweetPad)","preLaunchTask": "sweetpad: my launch"}]}
Currently, the SweetPad extension doesn't support setting launch arguments and environment variables when launching apps. While the extension supports basic app launching through the
sweetpad-lldb
configuration type, developers need more control over the app's launch configuration for different development scenarios.Current Configuration
Proposed Solution
Option 1: Enhanced Launch Configuration
Extend the existing configuration to include launch arguments and environment variables:
Option 2: Automatic Xcode Scheme Parser
Technical Considerations
SIMCTL_CHILD_
(Source)Use Cases
Control feature flags during development:
Configure debugging environment:
OS_ACTIVITY_MODE
Benefits
The text was updated successfully, but these errors were encountered: