Debugging with IronPython tools in Visual Studio: variables cannot be viewed

I installed VS 2010 Shell and IronPython Tools, but I can not get the debugger to show any values ​​using Quick Watch, it says that the variable was not found in context. Is it because I have not installed VS 2010, just a shell? An IronPython walkthrough document says that debugging is only supported by a C # expression evaluator so far.

TIA

+4
source share
2 answers

This is because it is supported by a C # expression evaluator. Therefore, the locals you see are the locals that C # sees. If you are inside a function, then usually parameters and local residents should be available as variables in watch / locals / autos. They are probably not available if you call locals (), use exec / eval or they are closure variables. They are also probably not available in a global or class context. There will usually be other variables (usually starting with $) that you can use to dig up the actual values.

If you don't need debugging between C # (or other .NET languages) and IronPython, you could use the new " Python Tools for Visual Studio ", which has a pure-Python debugging mode that works with IronPython. First you need to remove the IronPython function for the IronPython 2.7 tools first.

+1
source

Go to the project properties and change the “Launch Mode” to “Standard Python Launcher” (if you don't need to debug C # code)

+1
source

Source: https://habr.com/ru/post/1343436/


All Articles