[IronPython] Debugging IronPython script using "IronPython tools for Visual Studio(CP2)
yngipy hernan
yngipy at gmail.com
Wed Jun 16 06:48:15 CEST 2010
Hi Dino,
Thanks for being patient. I think you are right. It is actually working, I
am just not used to seeing "expected" exceptions.
By the way, where can I find ipy.pdb (I am assuming that it is the file that
"Cannot find or open the PDB file" points to as shown in debug session)?
Regards,
Yngipy
On Tue, Jun 15, 2010 at 1:34 PM, Dino Viehland <dinov at microsoft.com> wrote:
> Ok it looks like the last exception is a normal exception from startup.
> So the interesting question I guess is what happens between startup and when
> your script starts? Can you set a break point on the 1st line of your
> script and see what happens (you can just hit F9 while on the 1st line of
> code)? Does your script successfully run from the command line?
>
>
>
> *From:* users-bounces at lists.ironpython.com [mailto:
> users-bounces at lists.ironpython.com] *On Behalf Of *yngipy hernan
> *Sent:* Monday, June 14, 2010 5:50 PM
> *To:* Discussion of IronPython
> *Subject:* Re: [IronPython] Debugging IronPython script using "IronPython
> tools for Visual Studio(CP2)
>
>
>
> Ok, I am sure if what I did was correct.
>
>
>
>
>
> I did Debug | Exceptions..., since I don't know why exceptions, I just
> checked all. Then this is what I got:
>
>
>
> 'ipy.exe' (Managed (v4.0.30319)): Loaded
> 'C:\Windows\Microsoft.Net\assembly\GAC_32\mscorlib\v4.0_4.0.0.0__b77a5c561934e089\mscorlib.dll'
>
> 'ipy.exe' (Managed (v4.0.30319)): Loaded
> 'C:\Users\yoyong\AppData\Local\Microsoft\VisualStudio\10.0\Extensions\Microsoft\IronPython
> Tools for Visual Studio\0.2\ipy.exe'
>
> 'ipy.exe' (Managed (v4.0.30319)): Loaded
> 'C:\Users\yoyong\AppData\Local\Microsoft\VisualStudio\10.0\Extensions\Microsoft\IronPython
> Tools for Visual Studio\0.2\Microsoft.Dynamic.dll'
>
> 'ipy.exe' (Managed (v4.0.30319)): Loaded
> 'C:\Users\yoyong\AppData\Local\Microsoft\VisualStudio\10.0\Extensions\Microsoft\IronPython
> Tools for Visual Studio\0.2\Microsoft.Scripting.dll'
>
> 'ipy.exe' (Managed (v4.0.30319)): Loaded
> 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Configuration\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Configuration.dll'
>
> 'ipy.exe' (Managed (v4.0.30319)): Loaded
> 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System\v4.0_4.0.0.0__b77a5c561934e089\System.dll'
>
> 'ipy.exe' (Managed (v4.0.30319)): Loaded
> 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Xml\v4.0_4.0.0.0__b77a5c561934e089\System.Xml.dll'
>
> 'ipy.exe' (Managed (v4.0.30319)): Loaded
> 'C:\Users\yoyong\AppData\Local\Microsoft\VisualStudio\10.0\Extensions\Microsoft\IronPython
> Tools for Visual Studio\0.2\IronPython.dll'
>
> 'ipy.exe' (Managed (v4.0.30319)): Loaded
> 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Core\v4.0_4.0.0.0__b77a5c561934e089\System.Core.dll'
>
> 'ipy.exe' (Managed (v4.0.30319)): Loaded
> 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Numerics\v4.0_4.0.0.0__b77a5c561934e089\System.Numerics.dll'
>
> 'ipy.exe' (Managed (v4.0.30319)): Loaded
> 'C:\Users\yoyong\AppData\Local\Microsoft\VisualStudio\10.0\Extensions\Microsoft\IronPython
> Tools for Visual Studio\0.2\IronPython.Modules.dll'
>
> 'ipy.exe' (Managed (v4.0.30319)): Loaded 'Snippets.debug.scripting'
>
> 'ipy.exe' (Managed (v4.0.30319)): Loaded
> 'C:\Windows\Microsoft.Net\assembly\GAC_32\ISymWrapper\v4.0_4.0.0.0__b03f5f7f11d50a3a\ISymWrapper.dll'
>
> 'ipy.exe' (Managed (v4.0.30319)): Loaded 'Anonymously Hosted DynamicMethods
> Assembly'
>
> A first chance exception of type
> 'Microsoft.Scripting.ArgumentTypeException' occurred in
> Snippets.debug.scripting
>
>
>
> Additional information: Python Exception: TypeError
>
>
>
> 'ipy.exe' (Managed (v4.0.30319)): Loaded 'Snippets.scripting'
>
> A first chance exception of type 'System.MissingMemberException' occurred
> in IronPython.dll
>
>
>
> Additional information: 'module' object has no attribute '__all__'
>
>
>
> A first chance exception of type 'IronPython.Runtime.UnboundNameException'
> occurred in IronPython.dll
>
>
>
> Additional information: name 'fork' is not defined
>
>
>
> A first chance exception of type 'IronPython.Runtime.UnboundNameException'
> occurred in Microsoft.Dynamic.dll
>
>
>
> Additional information: name 'fork' is not defined
>
>
>
> The thread '<Thread Ended>' (0x930) has exited with code 0 (0x0).
>
> A first chance exception of type
> 'System.Reflection.TargetInvocationException' occurred in mscorlib.dll
>
>
>
> Additional information: Exception has been thrown by the target of an
> invocation.
>
>
>
> A first chance exception of type 'IronPython.Runtime.UnboundNameException'
> occurred in Microsoft.Dynamic.dll
>
>
>
> Additional information: name 'fork' is not defined
>
>
>
> A first chance exception of type 'IronPython.Runtime.UnboundNameException'
> occurred in IronPython.dll
>
>
>
> Additional information: name 'spawnvp' is not defined
>
>
>
> A first chance exception of type 'IronPython.Runtime.UnboundNameException'
> occurred in Microsoft.Dynamic.dll
>
>
>
> Additional information: name 'spawnvp' is not defined
>
>
>
> A first chance exception of type
> 'System.Reflection.TargetInvocationException' occurred in mscorlib.dll
>
>
>
> Additional information: Exception has been thrown by the target of an
> invocation.
>
>
>
> A first chance exception of type 'IronPython.Runtime.UnboundNameException'
> occurred in Microsoft.Dynamic.dll
>
>
>
> Additional information: name 'spawnvp' is not defined
>
>
>
> A first chance exception of type 'IronPython.Runtime.UnboundNameException'
> occurred in IronPython.dll
>
>
>
> Additional information: name 'fork' is not defined
>
>
>
> A first chance exception of type 'IronPython.Runtime.UnboundNameException'
> occurred in Microsoft.Dynamic.dll
>
>
>
> Additional information: name 'fork' is not defined
>
>
>
> A first chance exception of type
> 'System.Reflection.TargetInvocationException' occurred in mscorlib.dll
>
>
>
> Additional information: Exception has been thrown by the target of an
> invocation.
>
>
>
> A first chance exception of type 'IronPython.Runtime.UnboundNameException'
> occurred in Microsoft.Dynamic.dll
>
>
>
> Additional information: name 'fork' is not defined
>
>
>
> A first chance exception of type 'IronPython.Runtime.UnboundNameException'
> occurred in IronPython.dll
>
>
>
> Additional information: global name 'statvfs_result' is not defined
>
>
>
> A first chance exception of type 'System.MissingMemberException' occurred
> in IronPython.dll
>
>
>
> Additional information: 'module' object has no attribute '__file__'
>
>
>
> A first chance exception of type 'System.MissingMemberException' occurred
> in IronPython.dll
>
>
>
> Additional information: 'module' object has no attribute '__file__'
>
>
>
> A first chance exception of type 'System.MissingMemberException' occurred
> in IronPython.dll
>
>
>
> Additional information: 'module' object has no attribute '__file__'
>
>
>
> A first chance exception of type 'System.MissingMemberException' occurred
> in IronPython.dll
>
>
>
> Additional information: 'module' object has no attribute '__file__'
>
>
>
> A first chance exception of type 'System.MissingMemberException' occurred
> in IronPython.dll
>
>
>
> Additional information: 'module' object has no attribute '__file__'
>
>
>
> A first chance exception of type 'System.MissingMemberException' occurred
> in IronPython.dll
>
>
>
> Additional information: 'module' object has no attribute '__file__'
>
>
>
> A first chance exception of type 'System.ComponentModel.Win32Exception'
> occurred in IronPython.Modules.dll
>
>
>
> Additional information: Python Exception: WindowsError
>
>
>
> A first chance exception of type 'System.ComponentModel.Win32Exception'
> occurred in IronPython.Modules.dll
>
>
>
> Additional information: Python Exception: WindowsError
>
>
>
> A first chance exception of type
> 'System.Reflection.TargetInvocationException' occurred in mscorlib.dll
>
>
>
> Additional information: Exception has been thrown by the target of an
> invocation.
>
>
>
> A first chance exception of type 'System.ComponentModel.Win32Exception'
> occurred in Microsoft.Dynamic.dll
>
>
>
> Additional information: Python Exception: WindowsError
>
>
>
> A first chance exception of type 'System.ComponentModel.Win32Exception'
> occurred in IronPython.Modules.dll
>
>
>
> Additional information: Python Exception: WindowsError
>
>
>
> A first chance exception of type 'System.ComponentModel.Win32Exception'
> occurred in IronPython.Modules.dll
>
>
>
> Additional information: Python Exception: WindowsError
>
>
>
> A first chance exception of type
> 'System.Reflection.TargetInvocationException' occurred in mscorlib.dll
>
>
>
> Additional information: Exception has been thrown by the target of an
> invocation.
>
>
>
> A first chance exception of type 'System.ComponentModel.Win32Exception'
> occurred in Microsoft.Dynamic.dll
>
>
>
> Additional information: Python Exception: WindowsError
>
>
>
> A first chance exception of type
> 'IronPython.Runtime.Exceptions.ImportException' occurred in IronPython.dll
>
>
>
> Additional information: No module named sitecustomize
>
>
>
> A first chance exception of type
> 'IronPython.Runtime.Exceptions.ImportException' occurred in IronPython.dll
>
>
>
> Additional information: No module named usercustomize
>
>
>
> The program '[3708] ipy.exe: Managed (v4.0.30319)' has exited with code 1
> (0x1).
>
>
>
>
>
> On Tue, Jun 15, 2010 at 8:12 AM, yngipy hernan <yngipy at gmail.com> wrote:
>
> Ok, I need help. Can't find in internet how to "enable breaking on import
> exception". Anyone knows how to do this?
>
>
>
> Regards,
>
> Yngipy
>
>
>
> On Mon, Jun 14, 2010 at 11:53 AM, yngipy hernan <yngipy at gmail.com> wrote:
>
> *RE: Can you enable breaking on the import exception (or all exceptions
> and continue after these) and see what the last exception is?*
>
> Sorry, I am not familiar how to do this. I search for some tutorial, but if
> you have some wiki out there I can use, I can probably give it a try.
>
>
>
> Regards,
>
> Yngipy
>
>
>
> On Mon, Jun 14, 2010 at 3:33 AM, Dino Viehland <dinov at microsoft.com>
> wrote:
>
> I’m assuming the problem here is that this is exiting w/ a non-zero exit
> code indicating something went wrong. But what went wrong really depends on
> what the last exception is – there appears to be some failure to import
> something. The other exceptions are expected as the standard library throws
> exceptions on startup. Can you enable breaking on the import exception (or
> all exceptions and continue after these) and see what the last exception is?
>
>
>
> *From:* users-bounces at lists.ironpython.com [mailto:
> users-bounces at lists.ironpython.com] *On Behalf Of *yngipy hernan
> *Sent:* Saturday, June 12, 2010 11:41 PM
> *To:* users at lists.ironpython.com
> *Subject:* [IronPython] Debugging IronPython script using "IronPython
> tools for Visual Studio(CP2)
>
>
>
> Hi all,
>
>
>
> I am trying to debug my scripts using VS2010 Pro, for non-class based code
> it is working as expected. But got hiccups inside a class, this is what I am
> getting:
>
>
>
> 'ipy.exe' (Managed (v4.0.30319)): Loaded
> 'C:\Windows\Microsoft.Net\assembly\GAC_32\mscorlib\v4.0_4.0.0.0__b77a5c561934e089\mscorlib.dll'
>
> 'ipy.exe' (Managed (v4.0.30319)): Loaded
> 'C:\Users\yoyong\AppData\Local\Microsoft\VisualStudio\10.0\Extensions\Microsoft\IronPython
> Tools for Visual Studio\0.2\ipy.exe'
>
> 'ipy.exe' (Managed (v4.0.30319)): Loaded
> 'C:\Users\yoyong\AppData\Local\Microsoft\VisualStudio\10.0\Extensions\Microsoft\IronPython
> Tools for Visual Studio\0.2\Microsoft.Dynamic.dll'
>
> 'ipy.exe' (Managed (v4.0.30319)): Loaded
> 'C:\Users\yoyong\AppData\Local\Microsoft\VisualStudio\10.0\Extensions\Microsoft\IronPython
> Tools for Visual Studio\0.2\Microsoft.Scripting.dll'
>
> 'ipy.exe' (Managed (v4.0.30319)): Loaded
> 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Configuration\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Configuration.dll'
>
> 'ipy.exe' (Managed (v4.0.30319)): Loaded
> 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System\v4.0_4.0.0.0__b77a5c561934e089\System.dll'
>
> 'ipy.exe' (Managed (v4.0.30319)): Loaded
> 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Xml\v4.0_4.0.0.0__b77a5c561934e089\System.Xml.dll'
>
> 'ipy.exe' (Managed (v4.0.30319)): Loaded
> 'C:\Users\yoyong\AppData\Local\Microsoft\VisualStudio\10.0\Extensions\Microsoft\IronPython
> Tools for Visual Studio\0.2\IronPython.dll'
>
> 'ipy.exe' (Managed (v4.0.30319)): Loaded
> 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Core\v4.0_4.0.0.0__b77a5c561934e089\System.Core.dll'
>
> 'ipy.exe' (Managed (v4.0.30319)): Loaded
> 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Numerics\v4.0_4.0.0.0__b77a5c561934e089\System.Numerics.dll'
>
> 'ipy.exe' (Managed (v4.0.30319)): Loaded
> 'C:\Users\yoyong\AppData\Local\Microsoft\VisualStudio\10.0\Extensions\Microsoft\IronPython
> Tools for Visual Studio\0.2\IronPython.Modules.dll'
>
> 'ipy.exe' (Managed (v4.0.30319)): Loaded 'Snippets.debug.scripting'
>
> 'ipy.exe' (Managed (v4.0.30319)): Loaded
> 'C:\Windows\Microsoft.Net\assembly\GAC_32\ISymWrapper\v4.0_4.0.0.0__b03f5f7f11d50a3a\ISymWrapper.dll'
>
> 'ipy.exe' (Managed (v4.0.30319)): Loaded 'Anonymously Hosted DynamicMethods
> Assembly'
>
> A first chance exception of type
> 'Microsoft.Scripting.ArgumentTypeException' occurred in
> Snippets.debug.scripting
>
> 'ipy.exe' (Managed (v4.0.30319)): Loaded 'Snippets.scripting'
>
> A first chance exception of type 'System.MissingMemberException' occurred
> in IronPython.dll
>
> A first chance exception of type 'IronPython.Runtime.UnboundNameException'
> occurred in IronPython.dll
>
> A first chance exception of type 'IronPython.Runtime.UnboundNameException'
> occurred in Microsoft.Dynamic.dll
>
> A first chance exception of type
> 'System.Reflection.TargetInvocationException' occurred in mscorlib.dll
>
> A first chance exception of type 'IronPython.Runtime.UnboundNameException'
> occurred in Microsoft.Dynamic.dll
>
> A first chance exception of type 'IronPython.Runtime.UnboundNameException'
> occurred in IronPython.dll
>
> A first chance exception of type 'IronPython.Runtime.UnboundNameException'
> occurred in Microsoft.Dynamic.dll
>
> A first chance exception of type
> 'System.Reflection.TargetInvocationException' occurred in mscorlib.dll
>
> A first chance exception of type 'IronPython.Runtime.UnboundNameException'
> occurred in Microsoft.Dynamic.dll
>
> A first chance exception of type 'IronPython.Runtime.UnboundNameException'
> occurred in IronPython.dll
>
> A first chance exception of type 'IronPython.Runtime.UnboundNameException'
> occurred in Microsoft.Dynamic.dll
>
> A first chance exception of type
> 'System.Reflection.TargetInvocationException' occurred in mscorlib.dll
>
> A first chance exception of type 'IronPython.Runtime.UnboundNameException'
> occurred in Microsoft.Dynamic.dll
>
> A first chance exception of type 'IronPython.Runtime.UnboundNameException'
> occurred in IronPython.dll
>
> A first chance exception of type 'System.MissingMemberException' occurred
> in IronPython.dll
>
> A first chance exception of type 'System.MissingMemberException' occurred
> in IronPython.dll
>
> A first chance exception of type 'System.MissingMemberException' occurred
> in IronPython.dll
>
> A first chance exception of type 'System.MissingMemberException' occurred
> in IronPython.dll
>
> A first chance exception of type 'System.MissingMemberException' occurred
> in IronPython.dll
>
> A first chance exception of type 'System.MissingMemberException' occurred
> in IronPython.dll
>
> A first chance exception of type 'System.ComponentModel.Win32Exception'
> occurred in IronPython.Modules.dll
>
> A first chance exception of type 'System.ComponentModel.Win32Exception'
> occurred in IronPython.Modules.dll
>
> A first chance exception of type
> 'System.Reflection.TargetInvocationException' occurred in mscorlib.dll
>
> A first chance exception of type 'System.ComponentModel.Win32Exception'
> occurred in Microsoft.Dynamic.dll
>
> A first chance exception of type 'System.ComponentModel.Win32Exception'
> occurred in IronPython.Modules.dll
>
> A first chance exception of type 'System.ComponentModel.Win32Exception'
> occurred in IronPython.Modules.dll
>
> A first chance exception of type
> 'System.Reflection.TargetInvocationException' occurred in mscorlib.dll
>
> A first chance exception of type 'System.ComponentModel.Win32Exception'
> occurred in Microsoft.Dynamic.dll
>
> A first chance exception of type
> 'IronPython.Runtime.Exceptions.ImportException' occurred in IronPython.dll
>
> A first chance exception of type
> 'IronPython.Runtime.Exceptions.ImportException' occurred in IronPython.dll
>
> The program '[3216] ipy.exe: Managed (v4.0.30319)' has exited with code 1
> (0x1).
>
>
>
> Regards,
>
> Yngipy
>
>
>
> _______________________________________________
> Users mailing list
> Users at lists.ironpython.com
> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
>
>
>
>
>
>
>
> _______________________________________________
> Users mailing list
> Users at lists.ironpython.com
> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20100615/7e5f28e6/attachment.html>
More information about the Ironpython-users
mailing list