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
Copy file name to clipboardExpand all lines: CHANGELOG.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,6 +9,7 @@
9
9
- Prompt to cancel and replace the active test run if one is in flight ([#1774](https://github.com/swiftlang/vscode-swift/pull/1774))
10
10
- A walkthrough for first time extension users ([#1560](https://github.com/swiftlang/vscode-swift/issues/1560))
11
11
- Allow `swift.backgroundCompilation` setting to accept an object where enabling the `useDefaultTask` property will run the default build task, and the `release` property will run the `release` variant of the Build All task ([#1857](https://github.com/swiftlang/vscode-swift/pull/1857))
12
+
- Added new `target` and `configuration` properties to `swift` launch configurations that can be used instead of `program` for SwiftPM based projects ([#1890](https://github.com/swiftlang/vscode-swift/pull/1890))
// "launch" requests must have either a "target" or "program" property
104
+
if(
105
+
launchConfig.request==="launch"&&
106
+
!("program"inlaunchConfig)&&
107
+
!("target"inlaunchConfig)
108
+
){
109
+
thrownewError(
110
+
"You must specify either a 'program' or a 'target' when 'request' is set to 'launch' in a Swift debug configuration. Please update your debug configuration."
111
+
);
112
+
}
113
+
114
+
// Convert the "target" and "configuration" properties to a "program"
115
+
if(typeoflaunchConfig.target==="string"){
116
+
if("program"inlaunchConfig){
117
+
thrownewError(
118
+
`Unable to set both "target" and "program" on the same Swift debug configuration. Please remove one of them from your debug configuration.`
119
+
);
120
+
}
121
+
consttargetName=launchConfig.target;
122
+
if(!folderContext){
123
+
thrownewError(
124
+
`Unable to resolve target "${targetName}". No Swift package is available to search within.`
`Unknown configuration property "${buildConfiguration}" in Swift debug configuration. Valid options are "debug" or "release. Please update your debug configuration.`
131
+
);
132
+
}
133
+
launchConfig.program=awaitgetTargetBinaryPath(
134
+
targetName,
135
+
buildConfiguration,
136
+
folderContext
137
+
);
138
+
deletelaunchConfig.target;
139
+
}
101
140
102
141
// Fix the program path on Windows to include the ".exe" extension
0 commit comments