Skip to content

Commit

Permalink
refine logging to extract paths in case they don't match
Browse files Browse the repository at this point in the history
  • Loading branch information
chrissimon-au committed Nov 27, 2023
1 parent c56bc52 commit 5c6f0aa
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/vscode/contextive/test/helpers/Helpers.fs
Original file line number Diff line number Diff line change
Expand Up @@ -34,17 +34,17 @@ let waitFor = waitForTimeout 30000
let getDocUri relativeFile =
vscode.Uri.file (path.resolve (__dirname, relativeFile))

let findUriInVisibleEditors (path: Uri) =
window.visibleTextEditors.Find(fun te -> te.document.uri.path = path.path)
let findUriInVisibleEditors (docUri: Uri) =
window.visibleTextEditors.Find(fun te ->
printfn "docUri is: %s" (docUri.path)
logInspect docUri
printfn "editors path is: %s" (te.document.uri.path)
logInspect te.document.uri
te.document.uri.path = docUri.path)

let documentIsOpen docUri () =
promise {
let editor = findUriInVisibleEditors (docUri)
printfn "docUri is: %s" (docUri.toString ())
printfn "editors are:"
logInspect window.visibleTextEditors
printfn "editor is:"
logInspect editor
return editor <> null
}

Expand Down

0 comments on commit 5c6f0aa

Please sign in to comment.