# How do I debug a python application with Okteto and VSCode

**URL:** <https://community.okteto.com/t/how-do-i-debug-a-python-application-with-okteto-and-vscode/1310>\
**Category:** How Do I?\
**Created:** [July 30, 2024, 5:20pm UTC](https://community.okteto.com/t/how-do-i-debug-a-python-application-with-okteto-and-vscode/1310 "2024-07-30T17:20:27Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![russkey007](https://avatars.discourse-cdn.com/v4/letter/r/919ad9/32.png) [@russkey007](https://community.okteto.com/u/russkey007)\
**Post date:** [July 30, 2024, 5:20pm UTC](https://community.okteto.com/t/how-do-i-debug-a-python-application-with-okteto-and-vscode/1310/1 "2024-07-30T17:20:27Z")

</div>

Hi @ramiro,

I am trying to use Okteto for remote debugging of Python applications on K8S, with the VSCode as IDE.

I have “okteto build --deploy” and “okteto up” running

But it seems like I am missing something, because when I start debugging, I get a new local WSL terminal opened in VS Code, and it tries to run my application locally, which I want to be done remotely, if I understand correctly the flow.  
Could you please suggest a clue?  
Thank you!

---

<div class="post-metadata">

**Author:** ![ramiro](https://sea1.discourse-cdn.com/flex019/user_avatar/community.okteto.com/ramiro/32/6_2.png) [@ramiro](https://community.okteto.com/u/ramiro)\
**Post date:** [July 30, 2024, 7:00pm UTC](https://community.okteto.com/t/how-do-i-debug-a-python-application-with-okteto-and-vscode/1310/2 "2024-07-30T19:00:53Z")

</div>

Hey @russkey007!

That typically happens when your debug command in VSCode is configured to start a process rather than attaching to the existing one.

[This document](https://www.okteto.com/docs/development/containers/file-sync/python/#step-3-remote-development-with-okteto) explains the principles of remote debugging with python. The sample uses PyCharm.

[This recent thread](https://community.okteto.com/t/how-to-runremote-debugging-for-fastapi-based-python-web-app-in-vscode/1265/11) contains an example on how to use VSCode to debug a FastAPI python API, I think this might help you see what your configuration is missing.

Hope it helps!
