Debugging IronPython in Visual Studio 2010 - Source lines not synchronized - visual-studio-2010

I use VS 2010 to debug a single IronPython module. Everything works great. I can set breakpoints, watch local variables, etc. The only annoyance (which is serious) is that yellow arrow that marks the current step in the debugger is not synchronized with the real line being edited. Did anyone run into this issue?
I created an IronPython project through Visual Studio to make sure. I don't miss some important setting, but to no avail.
Pyramid Newbie
Update:
Ok. Problem solved. I had a bunch of Python interpreters installed and the default interpreter was Python 3.2. I switched the default interpreter to IronPython 2.7 and everything is peachy now. The settings is in Tools|Options|Python Tools|Interpreter Options|Default Interpreter

Ok. Problem solved. I had a bunch of Python interpreters installed and the default interpreter was Python 3.2. I switched the default interpreter to IronPython 2.7 and everything is peachy now. The settings is in Tools|Options|Python Tools|Interpreter Options|Default Interpreter

Related

SSIS Package Script Component Won't Show

I have a strange bug, I have a loop in my control flow, amongst other things in the loop I have two data flow tasks, each of these has a script component in it. When I use the Edit Script button the new window opens but the Solution Explorer is blank and no script ever shows, nothing is frozen it just doesn't appear. There are other script components within this same package and within the other packages we use and the scripts for them all seem to open fine. I was having this issue initially with VS 2017. I had no luck fixing the issue so I uninstalled/reinstalled, but no luck. I downloaded 2019 and those two scripts still will not appear for me in it. I've had several co-workers open these and everyone else sees these scripts fine regardless of the VS version.
Because you reinstalled VS 2019 I guess that you downloaded the newest version (16.9) of Visual Studio.
Version 16.9 have a big problem with script component and everybody trying to fix this bug.
Unfortunately, you can only downgrade VS to version 16.8 or wait for 16.10.
On link below, you can read that "issue has been fixed in 16.10 which will be released soon", as developers said.
Read common issues here:
https://marketplace.visualstudio.com/items?itemName=SSIS.SqlServerIntegrationServicesProjects
From my experiences (I had same issues), the easiest way is to downgrade version.
Maybe version 16.10 will bring some other issues.

PTVS - general IntelliSense problems - no error highlighting, no recognition of modules from other projects

I have used PTVS for two years now, and I remember (am I going crazy?) that PTVS always highlighted errors when working on a .py file in Visual Studio.
As of ~ Oct 10th (possible connected with v15.4 of VS2017), there have been issues with PTVS. In my frustration, I have completely reinstalled windows and wiped the entire computer clean. After installing drivers, I installed VS using the Visual Studio 2017 Community installer with the following options:
I then open Visual Studio, create a new empty python project, and type some garbage. No. Error. Correcting.
Am I going mad?
My python environment autocompletion / intellisense database is refreshed, by the way.
Meanwhile, the "View->Error List" window shows errors, even though they aren't highlighted.
Uninstalled the "Python native development tools" extension, still does not work. Installed with bare minimum python options (python language support, python 3.6, templates). Doesn't work.
Not sure if this is related (it probably is), Intellisense fails to recognize modules from other projects using any method. This was fine a week ago: (note green squiggles are Intellisense "Cannot resolve" errors)
I got the same issue as yours, but it could show the Red color in VS2015.
For this issue, I help you report this issue to the developer community site:
https://developercommunity.visualstudio.com/content/problem/132688/ptvs-general-intellisense-problems-no-error-highli.html
You could add your comment there.
For the second issue, about the module reference. Not the real Python team members, but maybe you could find a way here:
How to import functions from other projects in Python?
One thread for one issue, maybe you could start a new python issue for it.
This is a bug that fixed on 31 October 2017 with Update 15.4.2
Source
There was a bug in VS 2017 15.4, and apparently it will be fixed upon next release. For anyone experiencing these issues, VS 2015's Python Tools work if you need any of these functionalities.

Debugging IronPython in Visual Studio

I'm using Visual Studio 2012 to debug my IronPython program. I've got IronPython and PyTools installed already.
While debugging, when I hover over a variable, say tenants_path, the value that's shown is IronPython.Runtime.ClosureCell. Why is this happening?
To rectify this issue, I needed to right click on the solution, and choose Properties.
In the General tab, ensure that Interpreter is set to IronPython 2.7.
In Debug tab, ensure Launch mode: is set to Standard Python launcher.
IronPython doesn't generate debugging information for its generated code by default, so VS just does the best it can.
If you're running ipy.exe, then you should run with the -X:Debug command-line option; if you're embedding, you'll need to pass "Debug" as true when creating the engine.

How do I run unit tests with IronPython Studio?

I have recently had to move my project from using the CPython 2.6 interpreter in Eclipse with the PyDev plugin to IronPython 2.7 interpreter using IronPython Studios in Visual Studios 2010. Unfortunately I am a bit new to VS2010 and VS in general. There seems to be plenty of tool selections related to setting up all the tests I would want but when I select these tools, they all seem to want their tests to be in either C++, C#, or VB. Also, it seems I can only set a single file to be the active file where the flow of execution starts. I want to be able to run my collection of Python unit tests with the IronPython interpreter through Visual Studios (if possible). How would I go about doing this?
I would suggest that you move to Python Tools for Visual Studio instead of IronPython Studio. IpyStudio is pretty old, having been replaced by IronPython Tools for Visual Studio and that being replaced by PTVS. PTVS also supports IronPython 2.7 + CPython 2.5 - 3.2, has much better intellisense, and is generally just much more mature.
None of these unfortunately have integrated unit test support - the best you can do is switch the script which is currently set as the startup script. You can do that via the context menu in Solution Explorer if you were currently doing it by updating the project properties page, that might make it easier.
We're looking at doing integrated unit test support for a future version of PTVS, probably 2.0. Out of curiosity, what test framework are you using?

Python Triple Quoted Strings in Visual Studio 2010

I'm used to using Idle for Python development, but decided to give Visual Studio 2010 + IronPython a try last week. It seems to work fine, but I noticed that triple-quoted (multi-line) strings don't highlight correctly in the editor. See photo:
Does anyone else have this problem or know of a good fix? Apart from that bug, Visual Studio seems to be great for Python.
This is a bug that is already fixed for the next release - I screwed up storing our state while processing line-by-line when fixing another bug.
If you're really anxious you can actually build the MSI which includes the tools from the sources on CodePlex. Once you have the VS SDK installed it should be as simple as running Scripts\Bat\Dev.bat to setup the enlistment environment and then msbuild Msi\Installer.proj which will produce an MSI in Bin\Debug.

Resources