Skip to content

Walkthrough #1709

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open

Walkthrough #1709

wants to merge 5 commits into from

Conversation

rbenegal
Copy link
Contributor

@rbenegal rbenegal commented Jul 10, 2025

Description

Add some GIFs and additional steps for running, debugging and DocC previewing to the walkthrough created by @plemarquand.

Issue: 1560

Tasks

  • Required tests have been written
  • Documentation has been updated
  • Added an entry to CHANGELOG.md if applicable

plemarquand and others added 5 commits July 10, 2025 08:47
Adds a walkthrough to the package.json that guides users through:

- Installing Swift
- Creating a New Project
- Extension Commands
- Running Tests
- Selecting a Toolchain
Add some GIFs and additional steps for running, debugging and DocC
previewing.

Issue: swiftlang#1560
@rbenegal rbenegal marked this pull request as draft July 10, 2025 12:51
@rbenegal rbenegal marked this pull request as ready for review July 17, 2025 14:30
Copy link
Contributor

@award999 award999 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some suggestions, I now realize that the buttons are provided in the package.json, not the markdown files so I see you have a lot of the buttons I was suggesting :)

Thanks for doing this, looking great


When you open an existing project with a ``Package.swift`` file the extension will start automatically.

Tip: You can view more information about the toolchain and other configurations being used for the project by hovering over the `{}` icon in the status bar.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe worth adding an image to make sure they know which status item you're talking about


![Open existing project](./images/openProject.gif)

When you open an existing project with a ``Package.swift`` file the extension will start automatically.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if open could be its own walkthrough where you could show the explorer with Package.swift in it and the swift package resolve task getting kicked off. Sort of visual image to know it's working.

If we split that to a separate walkthrough, could mention the prompt to open in new window OR add to workspace as a way to link to the multi-root workspace documentation for vscode.


![Swift Extension Settings](./images/settings.gif)

The Swift Extension contains several settings you can customize.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe mention they can filter settings by @ext:swiftlang.swift-vscode

# Preview Documentation
![Preview documentation](./images/previewDocumentation.gif)

You can preview [documentation written using DocC](https://www.swift.org/documentation/docc/) directly in VS Code.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mention how they get to this point, which file extensions can be open, is there a palette or context command to load the preview?

![Run swift executable](./images/runExecutable.gif)

You can run a Swift binary target via the:
1. Code lens that appears in the `.swift` file
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
1. Code lens that appears in the `.swift` file
1. CodeLens that appears in the `.swift` file

this is the normal spelling I think

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe image too?

2. Project Panel in the bottom left hand corner of the sidebar
3. Tasks command: You can configure the build tasks through the `launch.json` file in the `.vscode` folder for the project

![Debug Swift Executable](./images/debugExecutable.gif)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

worth noting that the extension automatically generates the debug and release variant launch configurations that they can modify, maybe even having an action button to open the launch.json

# Run Swift Testing and XCTest Tests
![Run a test](./images/runTests.gif)

XCTests and Swift Testing tests are detected automatically. You can run them by clicking the ▶ button, with the `Run Test` code lens or through the `Test Explorer` in the sidebar.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

code lens -> CodeLens

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

don't need to call out every type but showing the run with code coverage one too may be nice...

@@ -0,0 +1 @@
![Testing](./images/testing.png)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dupe of assets/walkthrough/runTests.md?

# Swift Commands

![Swift Commands](./images/swiftCommands.svg)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe have a command button that opens command palette with "Swift:" set as the filter. And then document that cmd+shift+p opens command palette, and filter by "Swift:" to see all the swift commands that the extension provides.

@@ -0,0 +1,10 @@
The Swift extension automatically detects your installed Swift toolchain. However, it also provides a command called `Swift: Select Toolchain...` which can be used to select between toolchains if you have multiple installed.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we add action button to the Swift: Select Toolchain... command

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants