Where host:port identifies the port on which Komodo is listening. On the remote machine, run the pydbgp.py driver program with the appropriate options: python -S **path/to/**pydbgp.py -d **host:port** **your-script.py** ( Note: the “remote” machine can be the same machine on which Komodo is running.) On the Debug menu, ensure that Listen for Debugger Connections is checked.To start a Python remote debugging session from the command line: Note: For Komodo to open an editable copy of the file, a Mapped URI must be created to link the file on the remote filesystem with the URI Komodo receives from the remote debugger. An exception reaches the top-level in a Python script that is set up for just-in-time debugging.Īll methods require that the Python remote debugger client package is installed on the remote machine (see Installing the Python Remote Debugger).Calling () directly from within your Python program code.Python remote debugging sessions are started in one of three ways: If you have added custom modules to your python site-packages, PYTHONPATH or sys.path with the same name as those imported by pydbgp, the debugger may not work properly. Note: The debugging client relies on certain core python library files (e.g. If the setup is correct, the internal help documentation for running pydbgp is displayed. Now try running this command: pydbgp -help On Linux and Mac OS X, ensure that the pydbgp script is executable by running this command: chmod u+x **path/to**/pydbgp On Windows, also make sure that your PATHEXT environment variable includes. Tip: Placing the pydbgp.py script in a directory that is on your PATH environment variable, makes the script easier to run. This is the main script that you run to start a remote debugging session. Put the bin\pydbgp.py script ( bin/pydbgp on Linux and Mac OS X) somewhere convenient. If this command results in an ImportError then you need to resolve the error before continuing. If this command prints the word “ok”, you can move to the next step. To verify that the setup is correct, run the following command: python -c "import dbgp.client print 'ok'" For example, on Windows, if you copied the files to a directory called C:\debugger, enter the following at the command line: set PYTHONPATH=%PYTHONPATH% C:\debugger Alternatively, you can copy the dbgp directory to a convenient location, and then add that directory to your PYTHONPATH environment variable. You can do this by copying the dbgp directory to the site-packages directory of your Python installation. Set up your Python installation so the dbgp Python package is on your PythonPath. Download and unzip the Komodo-PythonRemoteDebugging package for your platform and Komodo version from the Komodo Remote Debugging page.Mac OS X /Contents/SharedSupport/dbgp/pythonlib/įor Python3 remote debugging, use the package named python3lib. Alternatively, if your remote machine uses the same platform as the machine on which you installed Komodo, you can get the Python debugger client files from the pythonlib and bin subdirectories of the Komodo installation directory for your platform. Packages are available for download from the Komodo Remote Debugging page. To debug a Python program remotely, the Python debugger client package must be installed on the remote machine. Installing the Python Remote Debugger on the Remote Machine Komodo controls the debugging session once the session starts on the remote machine. When debugging a Python program remotely, the program is executed on the remote machine, and the debug output is sent to Komodo. See Komodo Debugger Functions for full instructions on using Komodo’s debugging functionality. On the Debug menu or Debug Toolbar, click Go/Continue or Step In to invoke the debugging session. If the preferred interpreter is in this list, click to select the interpreter.Komodo searches for Python interpreters on your system and displays them in the drop-down list. In the Preferences dialog box under Languages, click Python.To specify which Python interpreter Komodo should use to debug and run Python programs locally: The Komodo FAQ has a work-around solution. Note: Breakpoints will not work with the Psyco Python extension enabled. For a summary of debugger commands, see the Debugger Command List. For general information about using the Komodo debugger, see Komodo Debugger Functions.ĭebugger commands can be accessed from the Debug menu, by shortcut keys, or from the Debug Toolbar. The instructions below describe how to configure Komodo and Python for debugging. Komodo can be used to debug Python programs locally or remotely, including debugging in CGI environments.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |