-
-
Notifications
You must be signed in to change notification settings - Fork 42
VS Code launch configuration to debug the user's Indiekit installation #769
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
base: main
Are you sure you want to change the base?
Conversation
paulrobertlloyd
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is really interesting, and can see how it would help people onboard to the project! That said, I think it should be optional, much like adding Docker files to a project. We can do this by asking something like ‘Would you like to enable debugging in VS Code?’ as the final setup prompt.
| "name": "Debug Indiekit", | ||
| "skipFiles": ["<node_internals>/**"], | ||
| "program": "${workspaceFolder}/node_modules/@indiekit/indiekit/bin/cli.js", | ||
| // "args": ["--config", "path/to/your/indiekit.config.js"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this commented out code needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wasn't sure which arguments were accepted by cli.js. Later I ended up using this:
"args": ["--config", "indiekit.config.js", "serve"]| "main": "index.js", | ||
| "bin": { | ||
| "create-indiekit": "bin/create.js" | ||
| "create-indiekit": "bin/create.js delete-me" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does delete-me do here? I need to revisit this, but I think this script is called when you run npm init indiekit [directory name] or npm create indiekit [directory name]. Does this interfere with that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I was using delete-me as a placeholder for [directory name]
I agree. Better to make it optional like Docker. |
1b91b6e to
69936a4
Compare
3225b55 to
7934b22
Compare
f8d0cc8 to
f877637
Compare
d6ec3d5 to
742898d
Compare
cc2e089 to
04ad1f5
Compare
2392677 to
58dba1d
Compare
0533883 to
e09b3c4
Compare
This PR adds a template for a VS Code launch configuration that will be will materialize at
.vscode/launch.jsonin the user's Indiekit installation after they run thecreate-indiekitCLI.This file will allow the user to just press
F5and start debugging their Indiekit installation.