0
votes

As the title states, I'm using Visual Studio 2015 with IronPython/Python Tools for VS. As far as I can tell, all available Debugging Options and Exception Settings are enabled, yet no Python Exceptions are raised when I run the program: if a Python Exception occurs the program simply freezes in execution.

This is a problem as it makes it rather difficult to track down Exceptions. I'm hoping there are some settings that I may have missed (again, all of the Exception Settings are ticked).

I have noted two alerts that I'm not sure I can do anything about, but may be causing the problem:

  • Upon initializing my code, I get a message about the usage of "LoadFromContext": it is triggered by IronPython's ipyw.exe and the message says that the usage of LoadFromContext can cause unwanted behavior (this however, does not prevent the program from running normally).
  • When I exit the program early (before it reaches a Python Exception) I get an "NonMarshalable" error. Again, this occures because of IronPython/ipyw.exe.

I uninstalled both IronPython and PTVS and reinstalled the latest versions of both, but doing so has remedied the situation.

Thank you in advance for any feedback.

1

1 Answers

1
votes

It sounds like you're probably running using the CLR debugger and not the Python debugger, which means you'll either need to work with the CLR exceptions or switch to the normal Python debugger (as described in the PTVS documentation).

Using the normal Python debugger is going to be entirely appropriate for most cases. When you want to be able to step from Python into your C#/VB code, the CLR debugger will let you do that.