-
Notifications
You must be signed in to change notification settings - Fork 60
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.
![Screen Shot 2022-05-06 at 3 38 48 PM](https://user-images.githubusercontent.com/20211771/167213935-13efb00f-5964-4b5d-927a-79621e39ef88.png)
-
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".
![Screen Shot 2022-05-06 at 3 40 39 PM](https://user-images.githubusercontent.com/20211771/167453416-b743f88d-a346-4cc9-87d2-218d99992439.png)
- That should open a dropdown. You should click the appropriate "Oracle OpenJDK version"
![Screen Shot 2022-05-06 at 3 47 03 PM](https://user-images.githubusercontent.com/20211771/167454128-a858cde9-006d-4905-ab00-bf5d5c41664f.png)
- Once that is done, you should start seeing green arrows to the right of the line numbers in that file
![Screen Shot 2022-05-06 at 3 52 59 PM](https://user-images.githubusercontent.com/20211771/167461496-d1a8b256-a11c-4db3-bf87-9e30cdad1ce9.png)
- To the left of the green hammer, you should click the dropdown and select "Edit Configurations..."
![Screen Shot 2022-05-09 at 12 06 54 PM](https://user-images.githubusercontent.com/20211771/167461319-899bb305-aa32-4d81-bfd5-b6cac470d465.png)
- That should open a new window called "Run/Debug Configurations",
- Open the "Spring Boot" tab and click "Backend with Okta".
![Screen Shot 2022-07-29 at 10 49 25 AM](https://user-images.githubusercontent.com/20211771/181797084-11c6ccbf-7487-4368-9ae2-d3b131d77701.png)
- 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.
![Screen Shot 2022-05-06 at 3 57 50 PM](https://user-images.githubusercontent.com/20211771/167461901-d0f841b5-7ee0-4187-8e70-64f6ea469050.png)
- Have the appropriate backend running
- Start the frontend by selecting the frontend run configuration you want, and pressing the green play button
![Screen Shot 2023-01-24 at 11 34 30](https://user-images.githubusercontent.com/20211771/214366238-81e42b1d-7d78-4c12-8452-93b61f99dd6b.png)
- In the "Run" tab for the frontend run configuration you just started, find the URL that the console prints:
![Screen Shot 2023-01-24 at 11 36 58](https://user-images.githubusercontent.com/20211771/214366736-07d482fc-6d86-4ede-98e3-d84787b8bba5.png)
- 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