Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VSCode/PyCharm debugger settings and documentation + warnings fixes #844

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

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 on how to debug the API, allowing developers to inspect code, set breakpoints, and step through code execution to identify and fix issues.

The PR adds new sections to the README.md file, detailing how to debug the dockerized Toolkit API with VSCode and PyCharm. It also includes a new docs/debugging.md file, which provides a step-by-step guide for debugging with both tools.

Key Changes:

  • New Debugging Guide: The docs/debugging.md file offers a detailed walkthrough for debugging the dockerized Toolkit API using VSCode and PyCharm. It covers setting up the project, configuring the debugger, and running the API in debug mode.
  • Updated Makefile: The Makefile now includes new targets, vscode-debug and pycharm-debug, which facilitate debugging with VSCode and PyCharm, respectively.
  • New Docker Compose Files: Two new Docker Compose files, docker-compose.vscode.debug.yml and docker-compose.pycharm.debug.yml, have been added to configure the debugging environment for VSCode and PyCharm, respectively.
  • Updated Backend Files: The src/backend/main.py and src/backend/pycharm_debug_main.py files have been modified to include the asynccontextmanager decorator and the lifespan function, enhancing the application's lifecycle management.
  • Updated Schema Files: The src/backend/schemas/agent.py file has been updated to include the model_config dictionary, replacing the previous Config class.

@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 79.01%. Comparing base (5502d8d) to head (2a7ef6b).

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   79.56%   79.01%   -0.55%     
==========================================
  Files         251      252       +1     
  Lines       10632    10707      +75     
==========================================
+ Hits         8459     8460       +1     
- Misses       2173     2247      +74     

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


🚨 Try these New Features:

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.

2 participants