-
Notifications
You must be signed in to change notification settings - Fork 53
IntelliJ run configurations
elisa lee edited this page Jan 24, 2023
·
5 revisions
This page guides us through setting up IntelliJ's run configurations to run the app via IntelliJ.
- complete all setup steps in Running outside of Docker
- install IntelliJ IDEA
- Make sure you didn't already open the repo in IntelliJ
- If you mess up somewhere, do
sudo rm -rf .idea
in the project root to start from scratch
After opening the project,
- You should see the following alerts appear in the lower right-hand corner.
-
Click "Load"
-
You may also see a popup up that asks you if you want to
yarn install
, feel free to do this now although it's not strictly necessary -
Open the
backend/src/main/java/gov/cdc/usds/simplerepot/SimpleReportApplication.java
file in IntelliJ -
You should see a banner near the top of the editor, saying "Module JDK is not defined", click "Setup SDK".
- That should open a dropdown. You should click the appropriate "Oracle OpenJDK version"
- Once that is done, you should start seeing green arrows to the right of the line numbers in that file
- To the left of the green hammer, you should click the dropdown and select "Edit Configurations..."
- That should open a new window called "Run/Debug Configurations",
- Open the "Spring Boot" tab and click "Backend with Okta".
- Set the following:
- "Active profiles:" to
okta-local,local
- "Environment variables:" to the values in the repository's
.env
file as a comma-separated list and without the double quotes (e.g.SMARTY_AUTH_ID=123,SMARTY_AUTH_TOKEN=123,OKTA_API_KEY=123
) - Ask a developer for these values
- "Active profiles:" to
- Ensure the "Backend" run configuration only has the "Active profiles:" set to
dev
(This should be the default)
-
open the "npm" tab and click "Frontend" or "Frontend with Okta".
-
Set "Environment:" to
BROWSER=none
and click "Apply". Ignore the other options.
- Have the appropriate backend running
- Start the frontend by selecting the frontend run configuration you want, and pressing the green play button
- In the "Run" tab for the frontend run configuration you just started, find the URL that the console prints:
- On a Mac, CMD + Shift + click that URL
- A new browser window should open.
- Set breakpoints on the frontend code in IntelliJ where you would like the application to break on.
- Your debugger should now be working!
- Getting Started
- [Setup] Docker and docker compose development
- [Setup] IntelliJ run configurations
- [Setup] Running DB outside of Docker (optional)
- [Setup] Running nginx locally (optional)
- [Setup] Running outside of docker
- Accessing and testing weird parts of the app on local dev
- Accessing patient experience in local dev
- API Testing with Insomnia
- Cypress
- How to run e2e locally for development
- E2E tests
- Database maintenance
- MailHog
- Running tests
- SendGrid
- Setting up okta
- Sonar
- Storybook and Chromatic
- Twilio
- User roles
- Wiremock
- CSV Uploader
- Log local DB queries
- Code review and PR conventions
- SimpleReport Style Guide
- How to Review and Test Pull Requests for Dependabot
- How to Review and Test Pull Requests with Terraform Changes
- SimpleReport Deployment Process
- Adding a Developer
- Removing a developer
- Non-deterministic test tracker
- Alert Response - When You Know What is Wrong
- What to Do When You Have No Idea What is Wrong
- Main Branch Status
- Maintenance Mode
- Swapping Slots
- Monitoring
- Container Debugging
- Debugging the ReportStream Uploader
- Renew Azure Service Principal Credentials
- Releasing Changelog Locks
- Muting Alerts
- Architectural Decision Records
- Backend Stack Overview
- Frontend Overview
- Cloud Architecture
- Cloud Environments
- Database ERD
- External IDs
- GraphQL Flow
- Hibernate Lazy fetching and nested models
- Identity Verification (Experian)
- Spring Profile Management
- SR Result bulk uploader device validation logic
- Test Metadata and how we store it
- TestOrder vs TestEvent
- ReportStream Integration
- Feature Flag Setup
- FHIR Resources
- FHIR Conversions
- Okta E2E Integration
- Deploy Application Action
- Slack notifications for support escalations
- Creating a New Environment Within a Resource Group
- How to Add and Use Environment Variables in Azure
- Web Application Firewall (WAF) Troubleshooting and Maintenance
- How to Review and Test Pull Requests with Terraform Changes