-
Notifications
You must be signed in to change notification settings - Fork 33
Debug Environment Setup
Harel M edited this page Apr 4, 2024
·
13 revisions
The setup instructions are enabling the build of the project and some debugging. Full debugging of the site requires additional settings.
In order to regenerate the client code on every change use the following command inside IsraelHiking.Web
folder:
npm run build:watch
.
This will keep the wwwroot
typescript transpiled files up-to-date so you can change the code and instantly see the changes.
Once this is up and running you can debug the client side code using the developer tools.
In order to debug the Capacitor app (iOS or Android) make sure to setup everything needed according to the Capacitor setup instructions: See Capacitor's instructions here. In order to debug the app follow these steps:
- Go to
IsraelHiking.Web
folder - Run
npm run build:watch-mobile
- this will make the UI up-to-date with changes - Before starting a debug session in the IDE (xcode or Android Studio) run
npx cap sync
ornpx cap sync android
(for android platform) - Connect a device to the workstation
- Make sure the device allows debugging
- Start the app from the IDE in debug mode
- For Android: open chrome, surf to
chrome://inspect
and click on IsraelHiking link to open the console - For iOS: open safari on the mac and connect to the device to see the console. There are also prints to the xcode IDE logger from the console you can check
- Make sure the backend is up and running using the
dotnet run --project IsraelHiking.Web
- Surf to
localhost:5000/swagger/
and you should be presented with the API of the site- Expand the POST under Update
- Select the relevant configuration and click try it out!
- The update of the database will be running for about 10 minutes and can be seen in the logs (can be seen in the console where you ran
dotnet
) - Once completed the server is ready!
- To run UI tests use
npm run test
inIsraelHiking.Web
folder - To run server tests use run
dotnet test