ptvs

Is there any way to debug Python code embedded in C# with Visual Studio and PTVS?

六眼飞鱼酱① 提交于 2019-12-06 07:39:26
问题 I've created the code to embed IronPython code in C# public ScriptEngine GetEngine() { if( _engine != null ) return _engine; _engine = Python.CreateEngine(); var paths = _engine.GetSearchPaths(); paths.Add( _pythonPath ); _engine.SetSearchPaths( paths ); var runtime = _engine.Runtime; runtime.LoadAssembly( typeof( CharacterCore ).Assembly ); return _engine; } public IAbility Movement() { var engine = GetEngine(); var script = engine.CreateScriptSourceFromFile( Path.Combine( _pythonPath,

How do I suppress the console window when debugging python code in Python Tools for Visual Studio (PTVS)?

痴心易碎 提交于 2019-12-05 21:58:38
问题 In PTVS the default behavior is for the program to print to the Python console window and the Visual Studio Debug Output window. Realizing that it won't be able to accept user input, how do I suppress the Python console window? 回答1: This was more difficult to figure out than expected, but as usual, simple once you know. The quick answer. In the Solution Explorer, right click on the project and select Properties. On the General tab check the box next to Windows Application. Then save and close

How to debug a remote python application with (Python Tools for) Visual Studio?

柔情痞子 提交于 2019-12-05 07:51:08
According to http://pytools.codeplex.com/ , PTVS supports "Local and remote debugging". However, I couldn't find anything related to it or. So I'm curious if their "remote debugging" is simply attaching to a running process on the same machine or if there's some actual remote debugging support over TCP/IP available. I'd like to use PTVS for a WSGI-based web applications running on apache on another (linux) machine, but without a proper remote debugger (such as WinPDB, which is not that bad but sonmething integrated in the IDE would be better) it's not really useful... Pavel Minaev Remote

How can I install Python tool for visual studio 2015?

你离开我真会死。 提交于 2019-12-04 18:52:45
问题 I was trying to install python tool for visual studio 2015, well it should have been an easy task just go on new project and choose python and visual studio would have downloaded it for you, but there some error coming or what is it i don't understand. What i am doing is as follows: Step 01: I went here. Step 02: A box appears seeking for the permission to install.(It is says add support for python projects, support, debugging and more) and When I click on the install button step 03 window

VS 2015 Python Environments Greyed Out

百般思念 提交于 2019-12-04 15:22:06
I'm just getting started with Python and I want to use Visual Studio 2015 Community Edition (VS) for writing my code. However, after diligently following the instructions on GitHub (1) Install PTVS 2.2.2 (2) Install Windows Python 3.4.4, VS cannot find the Python interpreter and run the code. When I attempt to do so for VS manually via Options > Python Tools > Environment Option, all the buttons are greyed out (I cannot enter information) as well as the Python Environment Window I've tried uninstalling, reinstalling, repairing and modifying VS, PTVS and Python 3.4 but to no avail. Is there

Is there any way to debug Python code embedded in C# with Visual Studio and PTVS?

时光毁灭记忆、已成空白 提交于 2019-12-04 14:37:45
I've created the code to embed IronPython code in C# public ScriptEngine GetEngine() { if( _engine != null ) return _engine; _engine = Python.CreateEngine(); var paths = _engine.GetSearchPaths(); paths.Add( _pythonPath ); _engine.SetSearchPaths( paths ); var runtime = _engine.Runtime; runtime.LoadAssembly( typeof( CharacterCore ).Assembly ); return _engine; } public IAbility Movement() { var engine = GetEngine(); var script = engine.CreateScriptSourceFromFile( Path.Combine( _pythonPath, "movement.py" ) ); var code = script.Compile(); var scope = engine.CreateScope(); code.Execute( scope );

Installing Python Tools for Visual Studio 2012 (PTVS)

点点圈 提交于 2019-12-04 10:38:49
I installed the version for VS 2010 a few weeks ago, and it went flawlessly. I am not having such good luck for the version for VS 2012. What did I do wrong? I ran, in order, two installers from Microsoft, "vs_isoshell.exe", "vs_intshelladditional.exe", and then "PTVS 1.5RC VS 2012.msi". VS Shell 2012 came up, and the Python support appeared to be present. I used the Wizard to create a new Python project. It will not run when I click to debug it. Also, VS Shell does not display the bottom of the window correctly either. VS 2010 Shell and PTVS still work perfectly. What is the procedure for

Console windows closes right after I hit ctrl+F5 in visual studio tools for python

六月ゝ 毕业季﹏ 提交于 2019-12-04 04:06:31
I have installed Python Tools for Visual Studio and I cannot see the output in the console window like I see output when I run a C# console application within visual studio upon hitting the following Shortcut keys. F5 -- Starts debugging the program and closes the console window in c# and in Python Ctrl+F5 -- Start without debugging, works as expected in C# but not in Python program . It always exits the console window under both the options. There is a third option " Execute Project in Python Interactive " for a Python Application. This option sometimes produces output and sometimes does not.

How do I suppress the console window when debugging python code in Python Tools for Visual Studio (PTVS)?

我怕爱的太早我们不能终老 提交于 2019-12-04 03:16:33
In PTVS the default behavior is for the program to print to the Python console window and the Visual Studio Debug Output window. Realizing that it won't be able to accept user input, how do I suppress the Python console window? This was more difficult to figure out than expected, but as usual, simple once you know. The quick answer. In the Solution Explorer, right click on the project and select Properties. On the General tab check the box next to Windows Application. Then save and close the properties window. Done! Other details from the discussion of an issue posted in 2012 on the PTVS

Is it possible to debug a method called from the interactive window in PTVS?

无人久伴 提交于 2019-12-02 03:27:20
When I'm developing in Python I often want to debug a specific method, in which case it makes sense to call the method from the interactive console or debug interactive console. However, when a method is called from the interactive windows in PTVS, it doesn't stop at the break points in said method. If it's possible, please tell me how to do it. If not, I would like to request this feature, and also to know if there is any quicker way to debug a specific method than calling it from the main script. I'm using PTVS 2.0 RC in Visual Studio 2013 Ultimate When using the regular (non-debug) Python