Skip to content

Commit b2996da

Browse files
authored
fix debug launch (#1871)
1 parent 4db7726 commit b2996da

File tree

3 files changed

+16
-17
lines changed

3 files changed

+16
-17
lines changed

RELEASE_NOTES.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
### 7.5.4 - 07.05.2023
2+
3+
* Fix debug settings to not override coreclr from omnisharp.
4+
* Update Ionide TextMate grammar to pick up some fixes (Thanks @jkillingsworth!)
5+
16
### 7.5.3 - 21.04.2023
27

38
* Update to FSAC 0.59.6 to get all the delightful new features and fixes. You can check the release notes for [0.59.6](https://github.com/fsharp/FsAutoComplete/releases/tag/v0.59.5).

release/package.json

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@
66
},
77
"activationEvents": [
88
"onCommand:workbench.action.tasks.runTask",
9+
"onDebugInitialConfigurations:coreclr",
910
"onDebugDynamicConfigurations:coreclr",
11+
"onDebugResolve:coreclr",
1012
"workspaceContains:**/*.fs",
1113
"workspaceContains:**/*.fsproj",
1214
"workspaceContains:**/*.fsx",
@@ -826,12 +828,6 @@
826828
"title": "F#",
827829
"type": "object"
828830
},
829-
"debuggers": [
830-
{
831-
"label": "Ionide LaunchSettings",
832-
"type": "coreclr"
833-
}
834-
],
835831
"grammars": [
836832
{
837833
"language": "fsharp",

src/Components/Debugger.fs

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -337,14 +337,14 @@ module Debugger =
337337
override x.provideDebugConfigurations(folder: option<WorkspaceFolder>, token: option<CancellationToken>) =
338338
let generate () =
339339
promise {
340-
logger.Info $"Evaluating launch settings configurations for workspace '%A{folder}'"
340+
logger.Info("Evaluating launch settings configurations for %O", folder)
341341
let projects = Project.getLoaded ()
342342
let! msbuildTasks = tasks.fetchTasks (msbuildTasksFilter)
343343

344344
let tasks =
345345
projects
346-
|> Seq.collect (fun (p: Project) ->
347-
seq {
346+
|> List.collect (fun (p: Project) ->
347+
[
348348
let projectFile = node.path.basename p.Project
349349

350350
let buildTaskForProject =
@@ -360,24 +360,22 @@ module Debugger =
360360
match defaultConfigForProject (p, buildTaskForProject) with
361361
| Some p -> yield p
362362
| None -> ()
363-
})
363+
])
364364

365365
return ResizeArray tasks
366366
}
367367

368-
generate ()
369-
|> Promise.map Some
370-
|> Promise.toThenable
371-
|> U2.Case2
372-
|> ProviderResult.Some
368+
generate () // this bix/unbox is a hack because JS types
369+
|> box
370+
|> unbox
373371

374372
override x.resolveDebugConfiguration
375373
(
376374
folder: option<WorkspaceFolder>,
377375
debugConfiguration: DebugConfiguration,
378376
token: option<CancellationToken>
379377
) =
380-
logger.Info $"Evaluating launch settings configurations for workspace2 '{folder}'"
378+
logger.Info("Resolving launch settings configuration %O for %O", debugConfiguration, folder)
381379
ProviderResult.Some(U2.Case1 debugConfiguration)
382380

383381
override x.resolveDebugConfigurationWithSubstitutedVariables
@@ -386,7 +384,7 @@ module Debugger =
386384
debugConfiguration: DebugConfiguration,
387385
token: option<CancellationToken>
388386
) =
389-
logger.Info $"Evaluating launch settings configurations for workspace3 '{folder}'"
387+
logger.Info("Resolving subsituted launch settings configuration %O for %O", debugConfiguration, folder)
390388
ProviderResult.Some(U2.Case1 debugConfiguration) }
391389

392390
let activate (c: ExtensionContext) =

0 commit comments

Comments
 (0)