Skip to content

Conversation

EugeneLightsOn
Copy link
Collaborator

@EugeneLightsOn EugeneLightsOn commented Nov 15, 2024

Initial steps to configure debugger in popular IDEs

AI Description

This PR introduces debugging capabilities for the dockerized Toolkit API using VSCode and PyCharm. It provides a comprehensive guide for setting up the debugging environment, including configuration changes, new scripts, and updated documentation.

Changes:

  • Makefile: New targets vscode-debug and pycharm-debug are added to facilitate debugging with VSCode and PyCharm, respectively.
  • README.md: A new section is added to the README, providing a high-level overview of the debugging process with links to the detailed documentation.
  • docker-compose.debug.yml: A new file is introduced to define the debugging services, including the database, test database, and backend services.
  • docker_scripts/debugrun-entrypoint.sh: This new script is responsible for starting the debugging process based on the chosen IDE.
  • docs/assets: New assets are added to illustrate the debugging process for both VSCode and PyCharm.
  • docs/debugging.md: A new documentation file is created, providing a step-by-step guide for debugging with VSCode and PyCharm.
  • pyproject.toml: The file is updated to include a new group [tool.poetry.group.local-debug] with the dependency debugpy.
  • src/backend/debug.Dockerfile: A new Dockerfile is introduced to set up the debugging environment, including environment variables, copying necessary files, and running the entrypoint script.
  • src/backend/main.py: The file is modified to include the RouterName import and use it when adding routers to the app. The lifespan function is also added to handle authentication-related tasks.
  • src/backend/pycharm_debug_main.py: A new file is added to define the debugging entry point for PyCharm, including the necessary imports, configuration, and debugging logic.
  • src/backend/schemas/agent.py: The class Config is replaced with model_config to provide additional configuration options.

@codecov-commenter
Copy link

codecov-commenter commented Nov 15, 2024

Codecov Report

Attention: Patch coverage is 11.62791% with 76 lines in your changes missing coverage. Please review.

Project coverage is 78.11%. Comparing base (ea23011) to head (dea75c3).

Files with missing lines Patch % Lines
src/backend/pycharm_debug_main.py 0.00% 75 Missing ⚠️
src/backend/main.py 90.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #844      +/-   ##
==========================================
- Coverage   78.63%   78.11%   -0.53%     
==========================================
  Files         258      259       +1     
  Lines       11039    11114      +75     
==========================================
+ Hits         8681     8682       +1     
- Misses       2358     2432      +74     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Collaborator

@malexw malexw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Really looking forward to using this setup for debugging!

…ion-for-debugger-settings-in-popular-ides

# Conflicts:
#	poetry.lock
@EugeneLightsOn EugeneLightsOn merged commit c039eca into main Dec 6, 2024
8 checks passed
@EugeneLightsOn EugeneLightsOn deleted the eugene/tlk-1990-create-documentation-for-debugger-settings-in-popular-ides branch December 6, 2024 13:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants