Closed ResourceHog closed 4 months ago
swift package init
does not create a package that builds an executable.
Did you mean swift package init --type executable
?
Also the dialog you posted above implies a launch.json was created as it is asking for a particular executable.
At startup the build tasks are disabled until package loading, resolve and test listing has completed. Do you have any spinners in the footer bar.
I had tried to create my own launch.json and tasks with no success.
I tried recreating the package with swift package init --type executable
and it seems to have created a launch.json and some task correctly that time.
However, when I try to run the program with a simple print statement it seems like there is nothing being printed to console nor is it accepting inputs.
I expected there to be a "hello, world!" in the console followed by "What's your name" then it should wait for input. However what however the console only briefly opens and closes. I was able to take this screenshot thanks to a breakpoint it shows nothing was written to console.
I had read that it's actually the xcode debug console that this is supposed to be written to but, vscodes equivalent doesn't seem to have the right content on it.
Reposting this here. This may be a bug in LLDB? https://github.com/apple/swift/issues/72374#issuecomment-2002003680
Yes this is a bug in LLDB. There is a fair amount of discussion about it in #309. I'm going to close this as a duplicate
Describe the bug I am unable to run a swift application in the debugger because the require launch.json and tasks are not added to vscode by the extension.![image](https://github.com/swift-server/vscode-swift/assets/3767092/4af944fe-54ec-4c1c-8ae8-e2f17f465177)
To Reproduce Steps to reproduce the behavior:
swift package init
Run and Debug
tabExpected behavior Should compile and run the code. Environment