-
-
Notifications
You must be signed in to change notification settings - Fork 37
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
VS Code launch configuration to debug the user's Indiekit installation #769
base: main
Are you sure you want to change the base?
Conversation
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"]
@@ -19,7 +19,7 @@ | |||
"type": "module", | |||
"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
This PR adds a template for a VS Code launch configuration that will be will materialize at
.vscode/launch.json
in the user's Indiekit installation after they run thecreate-indiekit
CLI.This file will allow the user to just press
F5
and start debugging their Indiekit installation.