Skip to content

Conversation

@jackdbd
Copy link
Contributor

@jackdbd jackdbd commented Oct 15, 2024

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 the create-indiekit CLI.

This file will allow the user to just press F5 and start debugging their Indiekit installation.

debug-indiekit

Copy link
Collaborator

@paulrobertlloyd paulrobertlloyd left a 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"]
Copy link
Collaborator

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?

Copy link
Contributor Author

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"
Copy link
Collaborator

@paulrobertlloyd paulrobertlloyd Oct 21, 2024

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?

Copy link
Contributor Author

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]

@jackdbd
Copy link
Contributor Author

jackdbd commented Oct 21, 2024

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.

I agree. Better to make it optional like Docker.

@paulrobertlloyd paulrobertlloyd force-pushed the main branch 2 times, most recently from 1b91b6e to 69936a4 Compare November 15, 2024 23:40
@paulrobertlloyd paulrobertlloyd force-pushed the main branch 4 times, most recently from 3225b55 to 7934b22 Compare November 26, 2024 01:06
@paulrobertlloyd paulrobertlloyd force-pushed the main branch 2 times, most recently from f8d0cc8 to f877637 Compare December 3, 2024 21:10
@paulrobertlloyd paulrobertlloyd force-pushed the main branch 2 times, most recently from d6ec3d5 to 742898d Compare December 26, 2024 16:40
@paulrobertlloyd paulrobertlloyd force-pushed the main branch 4 times, most recently from cc2e089 to 04ad1f5 Compare April 13, 2025 00:08
@paulrobertlloyd paulrobertlloyd force-pushed the main branch 2 times, most recently from 2392677 to 58dba1d Compare December 7, 2025 14:57
@paulrobertlloyd paulrobertlloyd force-pushed the main branch 2 times, most recently from 0533883 to e09b3c4 Compare December 24, 2025 21:46
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.

2 participants