Skip to content
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

Suggestion: launch.json #18

Open
teofanis opened this issue Dec 4, 2022 · 2 comments
Open

Suggestion: launch.json #18

teofanis opened this issue Dec 4, 2022 · 2 comments

Comments

@teofanis
Copy link
Contributor

teofanis commented Dec 4, 2022

Would you be open for an optional VS Code setting available during setup ?

Scenario :
User runs npx aocrunner init and is presented with the setup wizard.
After the user has selected their language, package manager, folder, name etc... an optional question is asked:
Would you like to enable VS Code integration/launch.json settings ? (y/N). (Or something similar)

If the user specifies "Y", a new .vscode/launch.json file will be added.

This will allow the user to press (F5/Ctrl+F5) or select Run and have VS Code prompt them for the number of the day they want to run.

(Example picture below)

image
image

Let me know if you'd be open to something like this and I can open a PR.

@caderek
Copy link
Owner

caderek commented Dec 4, 2022

I don't know, on one side I like that the runner is IDE-agnostic (and npm start <day number> is imo simple enough), on the other side most people probably use VSCode anyway, and generating lunch.json could be a nice addition (especially if there is also a debugger config). I have to think about it. Is it worth implementing and pay the cost of maintaining?

@teofanis
Copy link
Contributor Author

teofanis commented Dec 5, 2022

I agree, the runner should be IDE-agnostic, that's why I was thinking to prompt the user and let them decide during setup, whether to have "VS Code Run Integration" enabled or not.

As for maintenance, I don't think there will be any - The launch.json will call "npm"/"yarn"/"pnpm" (start) with an argument and the script will be doing the rest as it does today.

The way I see it, is that if the user wants it during setup, it will set some nice "defaults" that they can built upon, if they want to further customise what happens when they run it.

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

No branches or pull requests

2 participants