Skip to content

Conversation

@Virajjai
Copy link

Description

This PR adds automatic generation of a .vscode/launch.json file when creating new Booster projects. This provides developers with a pre-configured VS Code debug setup for running unit tests, improving the development experience.

Changes

  • Added launch-json.ts template - Created a new template file with VS Code launch configuration for unit tests
  • Updated project initializer - Modified project-initializer.ts to:
    • Import the launch.json template
    • Create .vscode directory during project initialization
    • Generate .vscode/launch.json file with the template content
  • Added comprehensive tests - Updated test files to verify:
    • .vscode directory creation in generateRootDirectory() function
    • .vscode/launch.json file generation in generateConfigFiles() function
    • Integration tests ensure the new functionality works with all project creation scenarios

Checks

  • Project Builds
  • Project passes tests and checks
  • Updated documentation accordingly

Additional information

This enhancement improves the developer experience by automatically providing a VS Code debug configuration when creating new Booster projects. The generated .vscode/launch.json file includes:

  • A "Unit Tests" configuration that runs rushx test
  • Proper workspace folder variable usage (${workspaceFolder})
  • Node terminal type for better integration with VS Code

The implementation follows the existing codebase patterns and maintains backward compatibility. All existing functionality continues to work as expected, and the new feature is thoroughly tested.

@what-the-diff
Copy link

what-the-diff bot commented Jun 17, 2025

PR Summary

  • Launch Configuration for Unit Tests

    • A new file named launch-json.ts was created that serves as a guide/template for setting up unit tests in the Visual Studio Code environment.
  • Improved Directory Creation for New Projects

    • Modifications were made to the code in project-initializer.ts to include the creation of a .vscode directory when setting up a new project, enhancing project structure.
  • Integration of launch.json in Initial Project Setup

    • The filesToGenerate list in project-initializer.ts now includes the launch.json file, assuring that this important file is created whenever a new project is initialized.
  • Enhanced Test Cases for Project Initialization

    • The testing files (project.test.ts and project-initializer.test.ts) have been adjusted to anticipate the creation of both the .vscode directory and launch.json file. This ensures our new initial setup process is correctly validated through our tests.

@davidverdu
Copy link
Collaborator

Hello. You need to create a changeset file and commit it to let this change be approved. Could you run rush change and commit the generated file? This is the pipeline error:

ERROR: The following projects have been changed and require change descriptions,
but change descriptions were not detected for them:
- @boostercloud/framework-core
To resolve this error, run "rush change". This will generate change description
files that must be committed to source control.

@davidverdu davidverdu self-assigned this Jun 17, 2025
@Virajjai
Copy link
Author

@davidverdu Now it's fine sir, I have generated the changeset and its seems to fine.

@davidverdu
Copy link
Collaborator

/integration sha=6126df160824fe5d0b7bfebb7a66205c51989f4b

@github-actions
Copy link
Contributor

⌛ Integration tests are running...

Check their status here 👈

@github-actions
Copy link
Contributor

✅ Integration tests have finished successfully!

@Virajjai
Copy link
Author

Virajjai commented Sep 7, 2025

@davidverdu sir , Can u check it out as if it's ok to merge.
Closes #1437

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