![]() ![]() |
||
![]() |
![]() |
|
![]() |
AW: [wingide-users] Problems with wingdbstub.SuspendDebugPeter.Frey@haufe.de Peter.Frey at haufe.deThu, 3 Apr 2003 23:25:50 +0200
Hi Stephan,
it works. But unfortunately it did not solve my startup performance =
problem.
I did implement your proposal as follows:
def cmsquery(args =3D None):
if not args:
args =3D sys.argv
if WINGDEBUG:
print "%s loading Wing Debugger ..." % now_time()
import wingdbstub
print "%s Wing Debugger loaded, parsing command line options =
..." %
now_time()
else:
print "%s parsing command line options ..." % now_time()
options =3D Options() #... breakpoint here ...
if __name__ =3D=3D '__main__':
cmsquery()
when starting now my script I get the display of "Debugger: Program =
running
(694 modules loaded)" very quickly
(approx. 5 seconds)
but it looks now like the "import wingdbstub" takes > 5 minutes (before =
it
was "import Zope" that took that long).
the output of my script looks now like
freyp@mycomputer:~/EPcvs/HRS/Prod/HaufeCMSScripts> sh start_query.sh
22:52:04 QueryTest started
22:52:04 starting up Zope environment ...
22:52:08 loading HaufeCMS ...
22:52:09 loading Wing Debugger ...
22:57:35 Wing Debugger loaded, parsing command line options ...
Is there anything else I could do to speed this up?
Peter
-----Urspr=FCngliche Nachricht-----
Von: Wing IDE Support [mailto:support@wingide.com]=20
Gesendet: Donnerstag, 3. April 2003 22:19
An: Peter.Frey@haufe.de
Cc: wingide-users@wingide.com
Betreff: Re: [wingide-users] Problems with wingdbstub.SuspendDebug
Hi,
The API will only work if you're launching the debug process from =
outside of
Wing. If you debug from within Wing, the debugger is already going by =
the
time you reach the import of wingdbstub, so the module does nothing and
doesn't set up the debugger API. When you ran from the command shell =
it
also didn't work because there's a bug in SuspendDebug that needs=20
fixing (oops, thanks for pointing it out!).
However, you probably don't need to use the API anyway. At this point =
this
is really only there for very unusual debugging scenarios.
Try removing your calls to the API and placing the import of wingdbstub
where you currently have the ResumeDebug call. This will delay =
starting
debug until that line is reached.
If you want to launch the process from the IDE, use the Execute items =
in the
Run menu instead. This runs things outside of the debugger and lets
wingdbstub do its work when it is imported.
If you do need .wingdebugpw, it's in ~/.wingide on Linux/Unix, and =
inside
profiles/[username] in your Wing installation on Win32. However, if =
both=20
processes run as the same user then the debugger looks up the file=20
automatically.
Hope that helps... if not, please let us know.
Thanks,
Stephan Deibel
--
Wing IDE for Python
Archaeopteryx Software, Inc
Take Flight!
www.wingide.com
Run by Mailman v 2.0.8 |
|
|
Copyright (c) 2000-2002, Archaeopteryx Software, Inc. Legal Statements | ||