🛠️ Study Game Dev Tools Guide
← Back to Game
Enabling Dev Mode
To enable the development tools, add ?dev=true to the URL:
http://localhost:3000/?dev=true
This will activate both the floating dev panel in the top-right corner and the fixed dev toolbar at the bottom of the screen.
Available Dev Tools
1. Answer Randomly
Purpose: Automatically answers all questions in the current quiz session with random selections.
How to use:
- Select a module and start a quiz
- Click "Answer Randomly" in either dev panel
- The system will instantly select random answers for all questions
- A notification will show your final score (e.g., "Randomly answered all questions. Score: 2/10")
Notes:
- This tool is useful for quickly testing quiz completion flow
- The score will vary as answers are selected randomly
- You can still navigate through questions to review the randomly selected answers
2. Load Simulated User
Purpose: Load progress data from previously simulated users created via the simulation script.
How to use:
- Click "Load Simulated User" in either dev panel
- A dropdown will appear with available simulated users
- Select a user from the list
- Click "Load Selected User"
- The page will reload with the selected user's progress data
Notes:
- Simulated users are created by running npm run dev:sim
- Each simulated user has their own history, progress, and statistics
- You can use this to test the UI with different progress states
3. Clear Storage
Purpose: Reset all local storage data to start with a clean state.
How to use:
- Click "Clear Storage" in either dev panel
- Confirm the action in the alert dialog
- The page will reload with all local storage data cleared
Notes:
- This is useful when you want to reset your testing environment
- All progress, settings, and user data will be removed from the browser
Creating Simulated User Data
To generate simulated user data for testing:
- Run the simulation script:
npm run dev:sim
- Follow the prompts to select modules and number of questions
- The script will create a simulated user with random answers
- Load this user with the "Load Simulated User" tool
Testing Multiple Questions
When testing question batches:
- Make sure to set the desired batch size in the settings (5, 10, 20, etc.)
- Start the quiz with a module containing enough questions
- If you need to answer quickly, use the "Answer Randomly" tool
The batch size setting limits the number of questions shown in a session, which is helpful for testing different quiz lengths.
Troubleshooting
Issue: Dev tools aren't visible
Solution: Make sure you have ?dev=true in your URL
Issue: Can't load simulated users
Solution: Run the simulation script first: npm run dev:sim
Issue: Random answers not working
Solution: Ensure you've selected a module and started a quiz
Issue: Only seeing a subset of questions
Solution: Check your batch size setting - it limits the number of questions per session
Best Practices
- Use simulated users for testing user progress features
- Use random answers for quickly testing quiz completion
- Clear storage between major test scenarios
- Use different batch sizes to test the quiz with varying question counts