Giter Site home page Giter Site logo

Comments (3)

w-e-w avatar w-e-w commented on August 15, 2024 1

google "remote debug a python script in vscode"
I think this is what you're looking for
https://code.visualstudio.com/docs/python/debugging
https://github.com/microsoft/debugpy
and a guide
https://stackoverflow.com/questions/73378057/how-to-debug-remote-python-script-in-vs-code

it should be possible for you to configure your vs code to connect to SSH server that can launch webui in debug mode and have your vsocde conect to the debug server

note I have never tried doing this myself


these days in most IDEs basically automatically setup the debugging environment as an option for convenience, but essentially what's going on under the hood is that a python script is launch with debug modules enable, the IDE then connects to the debug server with allows you to setup breakpoints in the code editor

I dont use VS code for python much so not to familiar, but I know it's possible setup remote debugging in pycharm, so I would expect it should also be possible in VS code

as far as I'm aware debugging is generally something that you (the developer) should configured and enabled by launching the python script with a debugging module enabled, and it is not something that a project should provide as a future

debugging is not something that you should enable if you're not actively doing debugging as sometimes debugging itself can lead to issues and performance lost

from stable-diffusion-webui.

kurophali avatar kurophali commented on August 15, 2024

google "remote debug a python script in vscode" I think this is what you're looking for https://code.visualstudio.com/docs/python/debugging https://github.com/microsoft/debugpy and a guide https://stackoverflow.com/questions/73378057/how-to-debug-remote-python-script-in-vs-code

it should be possible for you to configure your vs code to connect to SSH server that can launch webui in debug mode and have your vsocde conect to the debug server

note I have never tried doing this myself

these days in most IDEs basically automatically setup the debugging environment as an option for convenience, but essentially what's going on under the hood is that a python script is launch with debug modules enable, the IDE then connects to the debug server with allows you to setup breakpoints in the code editor

I dont use VS code for python much so not to familiar, but I know it's possible setup remote debugging in pycharm, so I would expect it should also be possible in VS code

as far as I'm aware debugging is generally something that you (the developer) should configured and enabled by launching the python script with a debugging module enabled, and it is not something that a project should provide as a future

debugging is not something that you should enable if you're not actively doing debugging as sometimes debugging itself can lead to issues and performance lost

I didn't know a1111 has any debug servers enabled by default. I'll try installing some debugging modules and run it on launch.py

from stable-diffusion-webui.

w-e-w avatar w-e-w commented on August 15, 2024

I didn't know a1111 has any debug servers enabled by default.

NO webui dose not and should not have debug servers

but Python itself does have modules that are used for debugging https://docs.python.org/3/library/pdb.html
and there are packages that enables more convenient debugging that are commonly integrated with the IDE
(like pydevd and debugpy)
with these stuff you should be able to run ANY a debugger (debuger server)
you can then connect to the debugger serve with an IDE that allows you to easily interact with the debugger like adding breakpoints

this is in most cases these days done "Automatically" when you set up a python development environment like using vs code or pycharm

so for ANY python script (not just webui) in most cases you should just configured your ID correctly to Launch the python script with debugger enabled

unless you're doing some advanced stuff which the default configuration does not support you should don't need to do an understand much

note I never tried to fully understand how debugger actually works so take my information with a grain of salt

most of us just launch with debug option that is pre-configured with an IDE, we don't try to understand how debugger actually functions

from stable-diffusion-webui.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.