Before running the debug command, ensure that the services are up. Start the full stack normally with:
make upthen bring up the API services in debug mode with either:
make debug-all # all API services in debug mode
make debug SERVICE=<service-name> # one service in debug modeWhen in debug mode, the services will wait for a debugger to attach before proceeding.
You can attach a debugger using your IDE or by using pdb in the terminal.
To leave debug mode use make debug-off SERVICE=<service-name> or make debug-off-all.
In the VSCode Run and Debug panel, you will find a launch configuration named:
CH APITrust APIImaging APIData Access APIUI
There is no launch configuration for the FL API, and no compound configurations to launch several
services together — attach to each one individually. To debug the FL API, run the debug-fl-api
VSCode task (Terminal > Run Task... > debug-fl-api), which is equivalent to
make debug SERVICE=fl-api-net-1, then attach your debugger to the port it opens.
To automatically create projects for manually testing the system, you can use the make -C flip-api create_testing_projects
command. This command will create projects in different stages (e.g. unstaged, staged, approved).
To clean the environment, you can use the make -C flip-api delete_testing_projects command.
These are also available as vscode tasks. To run them, you click on the Terminal > Run Task... in VSCode top menu and
select Create testing projects or Delete testing projects, or you can use the command palette (Ctrl+Shift+P) and type
Tasks: Run Task to find and run the tasks.