Changeset 87

Show
Ignore:
Timestamp:
07/01/05 17:35:12 (7 years ago)
Author:
mj
Message:

Updating to Wingware version:

- Some win32 fixes
- Scriptpatcher update
- Docs regerated and updated

Location:
WingDBG/trunk/WingDBG
Files:
4 modified

Legend:

Unmodified
Added
Removed
  • WingDBG/trunk/WingDBG/ScriptDebugging.py

    r30 r87  
    1515Wingware to support debugging of file system scripts running under Zope''' 
    1616 
    17 # This version number matches the corresponding same-featured 
    18 # version of Lennart's ScriptDebugging product 
    19 __version__='1.0.2' 
     17__version__='1.0.3' 
    2018 
    2119import sys, marshal 
     
    184182 
    185183############################################################################## 
     184 
     185class bad_func_code: 
     186    co_varnames = () 
     187    co_argcount = 0 
    186188 
    187189try: 
  • WingDBG/trunk/WingDBG/WingDBG.py

    r85 r87  
    2727__doc__ = """Wing Debugger Service Module""" 
    2828 
    29 __version__ = '2.0.2' 
     29__version__ = '2.0.3-1' 
    3030 
    3131 
  • WingDBG/trunk/WingDBG/documentation/wingdbgdocs.html

    r82 r87  
    44<head> 
    55<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> 
    6 <meta name="generator" content="Docutils 0.3.1: http://docutils.sourceforge.net/" /> 
    7 <title /> 
     6<meta name="generator" content="Docutils 0.3.8: http://docutils.sourceforge.net/" /> 
     7<title></title> 
    88<link rel="stylesheet" href="default.css" type="text/css" /> 
    99</head> 
     
    2424will (unavoidably) have extensive access to files and data on the system.</p> 
    2525<div class="note"> 
    26  
     26<p class="first admonition-title">Note</p> 
    2727<p><strong>Note:</strong> This guide is for Zope2 users.  If you are using Zope3, please 
    2828refer to <a class="reference" href="http://wingware.com/doc/debug/debugging-externally-launched-code">Debugging Externally Launched Code</a> in the users manual.</p> 
     
    3333<ul> 
    3434<li><p class="first"><strong>Install Zope</strong> -- You can obtain Zope from <a class="reference" href="http://www.zope.org">zope.org</a>.  Version  
    35 2.5.0 or newer will work with Wing.</p> 
     352.5.1 or newer will work with Wing.</p> 
    3636</li> 
    3737<li><p class="first"><strong>Install Wing IDE</strong> -- You will need <a class="reference" href="http://wingware.com/downloads">Wing IDE</a> 2.0.2 or later. 
     
    3939</li> 
    4040<li><p class="first"><strong>Configure Wing IDE</strong> -- Start Wing, create or open the project you 
    41 wish to use (from the <tt class="literal"><span class="pre">Project</span></tt> menu). Then use the <tt class="literal"><span class="pre">Extensions</span></tt> 
    42 tab in <tt class="literal"><span class="pre">Project</span> <span class="pre">Properties</span></tt> to enable <tt class="literal"><span class="pre">Zope2/Plone support</span></tt> and to 
     41wish to use (from the <tt class="docutils literal"><span class="pre">Project</span></tt> menu). Then use the <tt class="docutils literal"><span class="pre">Extensions</span></tt> 
     42tab in <tt class="docutils literal"><span class="pre">Project</span> <span class="pre">Properties</span></tt> to enable <tt class="literal"><span class="pre">Zope2/Plone support</span></tt> and to 
    4343specify the <tt class="literal"><span class="pre">Zope2 Instance Home</span></tt> to use with the project.  Wing 
    44 will find your Zope installation by reading the file <tt class="literal"><span class="pre">etc/zope.conf</span></tt> 
     44will find your Zope installation by reading the file <tt class="docutils literal"><span class="pre">etc/zope.conf</span></tt> 
    4545in the provided Zope instance.</p> 
    46 <p>Once you press <tt class="literal"><span class="pre">Apply</span></tt> or <tt class="literal"><span class="pre">OK</span></tt> in the Project Properties 
     46<p>Once you press <tt class="docutils literal"><span class="pre">Apply</span></tt> or <tt class="docutils literal"><span class="pre">OK</span></tt> in the Project Properties 
    4747dialog, Wing will ask to install the WingDBG product and will 
    4848offer to add files from your Zope installation to the project.</p> 
     
    5050<li><p class="first"><strong>Configure the WingDBG Product</strong> -- Start or restart Zope and 
    5151log into <a class="reference" href="http://localhost:8080/manage">http://localhost:8080/manage</a> (assuming default Zope 
    52 configuration). The Wing Debugging Service will be created automatically on  
    53 startup; you can find it under the Control Panel of your server. Do not alter 
    54 the other default values.</p> 
     52configuration).  The Wing Debugging Service will be created automatically 
     53on startup; you can find it under the Control Panel of your server.</p> 
    5554</li> 
    5655</ul> 
     
    5857<div class="section" id="starting-the-debugger"> 
    5958<h1><a name="starting-the-debugger">Starting the Debugger</a></h1> 
    60 <p>Proceed to the Wing Debugger Service by navigating to the Control Panel,  
    61 then selecting the 'Wing Debugging Service'. Click in the &quot;Start&quot; button.  
    62 The Wing IDE status area should display &quot;Debugger: Debug process running&quot;.</p> 
     59<p>Proceed to the Wing Debugger Service by navigating to the Control Panel, then 
     60selecting the 'Wing Debugging Service'. Click in the &quot;Start&quot; button. The Wing 
     61IDE status area should display &quot;Debugger: Debug process running&quot;.</p> 
    6362<p><strong>Problems?</strong>  See the Trouble-Shooting Guide below.</p> 
    6463</div> 
     
    8079<blockquote> 
    8180<ul class="simple"> 
    82 <li><tt class="literal"><span class="pre">Stack</span> <span class="pre">Data</span></tt> -- displays the stack, allows selecting current stack frame, 
     81<li><tt class="docutils literal"><span class="pre">Stack</span> <span class="pre">Data</span></tt> -- displays the stack, allows selecting current stack frame, 
    8382and shows the locals and globals for that frame.</li> 
    84 <li><tt class="literal"><span class="pre">Debug</span> <span class="pre">Probe</span></tt> -- lets you interact with your paused debug process using  
     83<li><tt class="docutils literal"><span class="pre">Debug</span> <span class="pre">Probe</span></tt> -- lets you interact with your paused debug process using  
    8584a Python shell prompt</li> 
    86 <li><tt class="literal"><span class="pre">Watch</span></tt> -- watches values selected from other value views (by right-clicking 
    87 and selecting one of the <tt class="literal"><span class="pre">Watch</span></tt> items) and allows entering expressions 
     85<li><tt class="docutils literal"><span class="pre">Watch</span></tt> -- watches values selected from other value views (by right-clicking 
     86and selecting one of the <tt class="docutils literal"><span class="pre">Watch</span></tt> items) and allows entering expressions 
    8887to evaluate in the current stack frame</li> 
    89 <li><tt class="literal"><span class="pre">Modules</span></tt> -- browses data for all modules in <tt class="literal"><span class="pre">sys.modules</span></tt></li> 
    90 <li><tt class="literal"><span class="pre">Exceptions</span></tt> -- displays exceptions that occur in the debug process</li> 
    91 <li><tt class="literal"><span class="pre">Debug</span> <span class="pre">I/O</span></tt> -- displays debug process output and processes keyboard input 
     88<li><tt class="docutils literal"><span class="pre">Modules</span></tt> -- browses data for all modules in <tt class="docutils literal"><span class="pre">sys.modules</span></tt></li> 
     89<li><tt class="docutils literal"><span class="pre">Exceptions</span></tt> -- displays exceptions that occur in the debug process</li> 
     90<li><tt class="docutils literal"><span class="pre">Debug</span> <span class="pre">I/O</span></tt> -- displays debug process output and processes keyboard input 
    9291to the debug process, if any</li> 
    9392</ul> 
     
    104103tips and documentation. Control-click on a source symbol to jump to its 
    105104point of definition (or use Goto Selected Symbol in the Source menu). 
    106 Bring up the <tt class="literal"><span class="pre">Source</span> <span class="pre">Browser</span></tt> from the Tools menu to look at the 
     105Bring up the <tt class="docutils literal"><span class="pre">Source</span> <span class="pre">Browser</span></tt> from the Tools menu to look at the 
    107106module and class structure of your code.</p> 
    108107</div> 
     
    116115<p>Take the following steps to take advantage of this feature:</p> 
    117116<ul class="simple"> 
    118 <li>Place a file called <tt class="literal"><span class="pre">refresh.txt</span></tt> in your Product's source directory 
    119 (for example, <tt class="literal"><span class="pre">Products/MyProductName</span></tt> inside your Zope 
     117<li>Place a file called <tt class="docutils literal"><span class="pre">refresh.txt</span></tt> in your Product's source directory 
     118(for example, <tt class="docutils literal"><span class="pre">Products/MyProductName</span></tt> inside your Zope 
    120119installation).  This file tells Zope to allow refresh for this product.</li> 
    121120<li>Open the Zope Management Interface.</li> 
     
    127126the changes you made take effect in the next browser page load.</li> 
    128127</ul> 
    129 <p><strong>Limitations</strong>: Zope may not refresh code if you use <tt class="literal"><span class="pre">import</span></tt> statements 
     128<p><strong>Limitations</strong>: Zope may not refresh code if you use <tt class="docutils literal"><span class="pre">import</span></tt> statements 
    130129within functions or methods. Also, code that manages to retain references to 
    131130old code objects after a refresh (for example, by holding the references in a 
     
    147146sharing files between the Zope host and the Wing IDE host. Windows file 
    148147sharing, Samba, NFS, and ftp or rsync mirroring are all options. 
    149 For secure file sharing via SSH on Linux, try <a class="reference" href="http://shfs.sourceforge.net/">shfs</a>.</p> 
     148For secure file sharing via SSH on Linux, try <a class="reference" href="http://fuse.sourceforge.net/sshfs.html">sshfs</a>.</p> 
    150149</li> 
    151150<li><p class="first"><strong>Install Wing on Server</strong> -- You will also need to install Wing on 
     
    169168of the Zope installation on your Zope host and the point where it is  
    170169accessible on you Wing IDE host.</p> 
    171 <p>For example, if your Zope host is <tt class="literal"><span class="pre">192.168.1.1</span></tt> Zope is installed in 
    172 <tt class="literal"><span class="pre">/home/myuser/Zope</span></tt> on that machine, and <tt class="literal"><span class="pre">/home/myuser</span></tt> is mounted on your 
    173 Wing IDE host as <tt class="literal"><span class="pre">e:</span></tt>, you would add a <tt class="literal"><span class="pre">Location Map</span></tt> preference setting 
    174 that maps <tt class="literal"><span class="pre">192.168.1.1</span></tt> to a list containing <tt class="literal"><span class="pre">/home/myuser/Zope</span></tt> and <tt class="literal"><span class="pre">file:e:/Zope</span></tt>.</p> 
     170<p>For example, if your Zope host is <tt class="docutils literal"><span class="pre">192.168.1.1</span></tt> Zope is installed in 
     171<tt class="docutils literal"><span class="pre">/home/myuser/Zope</span></tt> on that machine, and <tt class="docutils literal"><span class="pre">/home/myuser</span></tt> is mounted on your 
     172Wing IDE host as <tt class="docutils literal"><span class="pre">e:</span></tt>, you would add a <tt class="literal"><span class="pre">Location Map</span></tt> preference setting 
     173that maps <tt class="docutils literal"><span class="pre">192.168.1.1</span></tt> to a list containing <tt class="docutils literal"><span class="pre">/home/myuser/Zope</span></tt> and <tt class="docutils literal"><span class="pre">file:e:/Zope</span></tt>.</p> 
    175174<p>For more information on this, see <a class="reference" href="http://wingware.com/doc/debug/file-location-maps">File Location Maps</a> and <a class="reference" href="http://wingware.com/doc/debug/file-location-map-example">Location Map Examples</a> 
    176175in the Wing IDE manual.</p> 
     
    192191process as follows:</p> 
    193192<ul> 
    194 <li><p class="first">Go into the Wing Debugger in the Zope Management Interface and set <tt class="literal"><span class="pre">Log</span> 
    195 <span class="pre">file</span></tt> under the <tt class="literal"><span class="pre">Configure</span></tt> tab. Using <tt class="literal"><span class="pre">&lt;stdout&gt;</span></tt> will cause 
     193<li><p class="first">Go into the Wing Debugging Service in the Zope Management Interface and set <tt class="docutils literal"><span class="pre">Log</span> 
     194<span class="pre">file</span></tt> under the <tt class="docutils literal"><span class="pre">Configure</span></tt> tab. Using <tt class="docutils literal"><span class="pre">&lt;stdout&gt;</span></tt> will cause 
    196195logging information to be printed to the console from which Zope was 
    197196started.</p> 
     
    202201</li> 
    203202<li><p class="first">Inspect the contents of the log. If you are running Zope and Wing IDE on two 
    204 separate hosts, you should also inspect the <tt class="literal"><span class="pre">error-log</span></tt> file on the Wing IDE 
     203separate hosts, you should also inspect the <tt class="docutils literal"><span class="pre">error-log</span></tt> file on the Wing IDE 
    205204host (located in the <a class="reference" href="http://wingware.com/doc/install/user-settings-dir">User Settings Directory</a>). It contains additional 
    206205logging information from the Wing IDE process.</p> 
  • WingDBG/trunk/WingDBG/utils.py

    r70 r87  
    2929import os 
    3030import sys 
    31 import pwd 
    3231import string 
    3332import random 
     
    7271    if sys.platform == 'win32': 
    7372        if netserver is not None: 
    74             return gNetServer.abstract._GetUserWingProfileDir() 
     73            return netserver.abstract._GetUserWingProfileDir() 
    7574        else: 
    7675            username = getUsername()