Content-Type: multipart/alternative; boundary="0-2093854088-1294757278=:76057" --0-2093854088-1294757278=:76057 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Hi Fabio,=0A=0AThe current pydev=A0debug feature allows=A0the debugger to= =A0break when an exception =0Athat is present in a list of handled exceptio= ns, is thrown. The list of =0Aexception classes for which we want the debug= ger to break, is to be provided to =0Athe method pydevd.set_pm_excepthook v= ia the argument handle_exceptions.=0A=0AI propose to create a new UI which = will display all exception classes and =0Asubclasses in Python.=A0When the = application encounters any one of the selected =0Aexceptions, the debugger = will break. This list will be persisted on eclipse =0Arestart.=0A=0AI have = made a few changes in "org.python.pydev.debug\pysrc\pydevd.py" file, =0Awhe= rein I hardcoded some exception classes=A0in the variable=A0passed to the m= ethod =0Apydevd.set_pm_excepthook, to see how this feature actually works. = Currently=A0I am =0Anot able to build my pydev code.=A0Therefore I=A0launch= ed pydev changes=A0from the =0Amain eclipse using=A0"Run/Debug As -> Eclips= e Application".=0A=A0=0AI can see that the debugger breaks whenever=A0an ex= ception that is defined in the =0Aselected list is thrown. But I wanted to = test this feature in a multi threaded =0Aenvironment. I therefore wrote som= e sample code wherein I=A0spawn multiple =0Athreads, I can execute this cod= e using "Run As -> Python Run", but If try to =0Aexecute it using "Debug As= -> Python Run", pydev=A0throws the=A0following exception =0Afor each threa= d:=0A=A0=0AException in thread Thread-4:=0ATraceback (most recent call last= ):=0A=A0 File =0A"D:\P4\depot\tavantProjects\DL\Assets\InGame\Gameplay\Scri= pts\lib\threading.py", =0Aline 509, in _bootstrap_inner=0A=A0=A0=A0 self.ru= n()=0A=A0 File "D:\PyDev =0AEnhancement\runtime-New_configuration(1)\GameSc= ript\src\tavant\gamethread.py", =0Aline 20, in run=0A=A0=A0=A0 properties = =3D self.getFileProps()=0A=A0 File "D:\PyDev =0AEnhancement\runtime-New_con= figuration(1)\GameScript\src\tavant\gamethread.py", =0Aline 20, in run=0A= =A0=A0=A0 properties =3D self.getFileProps()=0A=A0 File =0A"D:\P4\depot\tav= antProjects\External\Pydev\pydev_1_6_4-0\plugins\org.python.pydev.debug\pys= rc\pydevd_frame.py",=0A line 102, in trace_dispatch=0A=A0=A0=A0self.doWaitS= uspend(thread, frame, event, arg)=0A=A0 File =0A"D:\P4\depot\tavantProjects= \External\Pydev\pydev_1_6_4-0\plugins\org.python.pydev.debug\pysrc\pydevd_f= rame.py",=0A line 25, in doWaitSuspend=0A=A0=A0=A0 self._args[0].doWaitSusp= end(*args, **kwargs)=0A=A0 File =0A"D:\P4\depot\tavantProjects\External\Pyd= ev\pydev_1_6_4-0\plugins\org.python.pydev.debug\pysrc\pydevd.py",=0A line 6= 94, in doWaitSuspend=0A=A0=A0=A0 self.processInternalCommands()=0A=A0 File = =0A"D:\P4\depot\tavantProjects\External\Pydev\pydev_1_6_4-0\plugins\org.pyt= hon.pydev.debug\pysrc\pydevd.py",=0A line 400, in processInternalCommands= =0A=A0=A0=A0 for tId in self.RUNNING_THREAD_IDS.keys():=0ARuntimeError: dic= tionary changed size during iteration=0A=0APreviously too I had debugged py= thon code in a multi threaded environment using =0APyDev. I had never faced= the above problem. I feel that the current problem is =0Abecause I am laun= ching=A0pydev from main eclipse using "Run/Debug As -> Eclipse =0AApplicati= on". =0A=0A=0AToday too I tried to build pydev. I created=A0 new build_cmd.= bat by modifying =0Athe=A0existing entries in "Pydev\builders\org.python.py= dev.build\build_cmd.txt" =0Afile. But still I couldn't=A0build pydev. I hav= e attached 'build_cmd.bat' and =0Aconsole prints=A0in 'pydev_build_failure.= txt' for your reference. I am still =0Agetting the following error: =0A=0A= =0ABUILD FAILED=0AD:\git_build_dir\Pydev\builders\org.python.pydev.build\bu= ild.xml:170: =0AD:\var\update-site\update\master\red-core not found.=0A=0AI= t would be great If you could help me out in resolving the build issue.=0A= =0A=0AThanks and Regards,=0AHussain Bohra=0A=0A --0-2093854088-1294757278=:76057 Content-Type: text/html; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable
=0A
Hi Fabio,
=0A
 
= =0A
=0A
The current pydev debug feature allows the debugg= er to break when an exception that is present in a list of handled exc= eptions, is thrown. The list of exception classes for which we want the deb= ugger to break, is to be provided to the method pydevd.set_pm_e= xcepthook via the argument handle_exceptions= .
=0A
 
=0A
I propose to create a new UI which= will display all exception classes and subclasses in Python. When the= application encounters any one of the selected exceptions, the debugger wi= ll break. This list will be persisted on eclipse restart.
=0A
&nbs= p;
=0A
I have made a few changes in "org.python.pydev.debug\py= src\pydevd.py" file, wherein I hardcoded some exception classes i= n the variable passed to the method pydevd.set_pm_exceptho= ok, to see how this feature actually works. Currently I = am not able to build my pydev code. Therefore I = launched pydev changes from the main eclipse using "Run/D= ebug As -> Eclipse Application".
=0A
=  
=0A
I can see that the debugger breaks whenever an exc= eption that is defined in the selected list is thrown. But I wanted to test= this feature in a multi threaded environment. I therefore wrote some sampl= e code wherein I spawn multiple threads, I can execute this code using= "Run As -> Python Run", but If try to execute it using "De= bug As -> Python Run", pydev throws the following excepti= on for each thread:
=0A
 
=0A
Exception in thread Thread-4:
Traceback (most re= cent call last):

  File "D:\P4\depot\tavantProjects\DL\As= sets\InGame\Gameplay\Scripts\lib\threading.py", line 509, in _bootstrap_inn= er
    self.run()
&nb= sp; File "D:\PyDev Enhancement\runtime-New_configuration(1)\GameScript\s= rc\tavant\gamethread.py", line 20, in run
    properties =3D self.getFileProps()
  File = "D:\PyDev Enhancement\runtime-New_configuration(1)\GameScript\src\tavant\ga= methread.py", line 20, in run
  &nbs= p; properties =3D self.getFileProps()
  File "D:\P4\depot= \tavantProjects\External\Pydev\pydev_1_6_4-0\plugins\org.python.pydev.debug= \pysrc\pydevd_frame.py", line 102, in trace_dispatch
    self.doWait= Suspend(thread, frame, event, arg)
  File "D:\P4\depot\ta= vantProjects\External\Pydev\pydev_1_6_4-0\plugins\org.python.pydev.debug\py= src\pydevd_frame.py", line 25, in doWaitSuspend
    self._args[0].doWaitSuspend(*args, **kwargs)  File "D:\P4\depot\tavantProjects\External\Pydev\pydev_1_6_4-0\pl= ugins\org.python.pydev.debug\pysrc\pydevd.py", line 694, in doWaitSuspend
    self.processInternalCommands= ()
  File "D:\P4\depot\tavantProjects\External\Pydev\pyde= v_1_6_4-0\plugins\org.python.pydev.debug\pysrc\pydevd.py", line 400, in pro= cessInternalCommands
    for tI= d in self.RUNNING_THREAD_IDS.keys():
RuntimeError: dictionary changed size during iteration
=0A
 
=0A
Previ= ously too I had debugged python code in a multi threaded environment using = PyDev. I had never faced the above problem. I feel that the current problem= is because I am launching pydev from main eclipse using "Run/= Debug As -> Eclipse Application".
=0A
 
=0A=
Today too I tried to build pydev. I created  new build_cmd.ba= t by modifying the existing entries in "Pydev\builders\org.py= thon.pydev.build\build_cmd.txt" file. But still I couldn't build = pydev. I have attached 'build_cmd.bat' and console prints in = 'pydev_build_failure.txt' for your reference. I am still getting t= he following error:
=0A
 
=0A
BUILD FAILED
D:\git_build_dir\Pydev\builders\org.python.pyd= ev.build\build.xml:170: D:\var\update-site\update\master\red-core not found= .
=0A
It would be great If you could help= me out in resolving the build issue.
=0A
 
=0A
&nbs= p;
=0A
=0A
Thanks and Regards,
= =0A
Hussain Bohra

--0-2093854088-1294757278=:76057--