swiftlang / vscode-swift

Visual Studio Code Extension for Swift
https://marketplace.visualstudio.com/items?itemName=sswg.swift-lang
Apache License 2.0
745 stars 52 forks source link

[Windows] No program output when run using launch config #700

Closed tomwyr closed 6 months ago

tomwyr commented 7 months ago

Describe the bug I have setup a simple project created using swift package init --type executable with the code visible on the recording. When I launch the code using one of the generated debug/release launch configs, the compiled code executes without any output.

Expected behavior I can see the output of my program either in the internal or external terminal windows.

https://github.com/swift-server/vscode-swift/assets/9600796/77e1a91d-094c-4a27-ade8-cf08fe44739a

Environment

adam-fowler commented 7 months ago

This is an issue with the Windows version of LLDB that comes with the Swift installation. A duplicate of this can be found here #309 One thing that has changed since then though is the availability of the llvm lldb debug adapter in the Swift installation. Can you see if you still get this if you go to the Settings and select Swift › Debugger: Use Debug Adapter From Toolchain

tomwyr commented 7 months ago

Thanks for the suggestion @adam-fowler I tried changing the adapter and the outcome is that running the code spawns a terminal window without producing any output. The debug session keeps running until I close the window or stop it from vscode.

adam-fowler commented 7 months ago

I'm going to close this is favour of 309 as it is a duplicate. I've tried to resurrect the conversation on that issue as well