-
Notifications
You must be signed in to change notification settings - Fork 35.4k
Description
tl;dr: Running a single file without a workspace open is a common pain point in usertesting. It should not just be easier, but also take the opportunity to check the user's environment and guide through the installation/configuration of missing dependencies.
Context
VS Code is used by many as their first editor while learning to code. Other editors in the space make it a lot easier to run a single file to see the output, which puts expectations on how VS Code should work. VS Code's latest improvements with auto-attach and JS debug terminal show how the setup time for debugging can be cut dramatically with smart affordances.
End to End Scenario
- User is interested in learning about TS, but doesn't have the NPM packages installed.
- To start, they create a single TS file in VS Code, without opening a folder.
- Rich TS editing works out of the box, so they start typing up a short script that logs some values.
- Then they try run the file to see if it compiles and logs the output.
- With a helpful hand from VS Code, the user installs the required TS dependencies.
- Finally, running the file works.
- [Out of scope] Later, after the user adds a a second file to use modules, VS Code guides the user to initialize a project with a tsconfig file (picking browser and/or node.js as target).
Alternative Scenerios
How the user is set up:
- While many devs have node.js installed, support the ones that don't.
- Some users might have an older node.js installed from prior projects
How the file is opened
- User opens a folder with a set of TS files (like the TS samples) and opens one file.
- User renames a JS file to TS in a folder to migrate some code.
Improvement ideas
- For loose files that VS Code knows how to debug, show a Run button on the file.
- Without a workspace open, the Run & Debug view should ask the user to select which file to run.
- Could/should VS Code …
- ship with a basic TS compiler,
- install one behind the scenes,
- guide the user through installation (via terminal?),
- or point to the right website for the user to complete the installation?
- Offer the guided environment setup during a getting started walkthrough for TS
- While we sweat the details, keep in mind how the same flows would work for Python, C++, Java, etc
Next steps
- Converging discussion on scope and clarify open questions
- UX & PoC for TS files (maybe as extension)
- Usertest & Experiment
- Ship it
cc @gcrev93 @DanielRosenwasser @connor4312 @misolori @JacksonKearl @kieferrm @mattbierner