This project has moved and is read-only. For the latest updates, please go here.

PTVS Launch With Errors?

Jul 20, 2013 at 8:52 PM
Edited Jul 20, 2013 at 9:03 PM
I have a growing problem with a projects under my solution that start off debugging with a popup:

Launch with errors?
One or more files in your project contain errors. Do you want to launch anyway?

The Output tab shows no issues, but since this is Python and VS, I have no idea if it is even relevant.

------ Build started: Project: pifpcs_json2kml, Configuration: Debug Any CPU ------
========== Build: 1 succeeded or up-to-date, 0 failed, 0 skipped ==========

I stripped my main python file down to bare bones, and still get the same error:

import os
prog = os.path.basename(sys.argv[0])


I have no idea what to do. This project also suffers from needing a breakpoint in the code so the debugger does not hang.

Has anybody seen this?

Windows 7 Ultimate x64
Python 2.7.5 64bit
VS Professional 2012
PTVS 2.0 beta

I created a new project under my solution, copied my main program into it, and it runs with out hanging or the error popup. So this appears to be related to project-file corruption in VS?

I deleted the original suspected corrupt project and renamed the new project to the former name.
Now I see the hang again when I start the debugger. So this appears to be solution-level corruption, potentially in addition to project-level.
Jul 21, 2013 at 1:01 AM
The build output is completely irrelevant - if we could prevent it from showing up at all then we would, but it breaks other features unfortunately. Open up the Error List and see what's in there. About the only errors we detect are invalid syntax, so it may be that you're using Python 3.x syntax in Python 2.x or vice-versa?

Could you either upload your solution somewhere or email it to as an attachment? I don't know that we've seen anything like this, at least not recently, so it'd be handy to have an actual project to look at.
Jul 21, 2013 at 9:08 PM
Hi Zooba,
Unfortunately by the time I read this the error situation no longer occurs. Would you like the solution anyway or should we wait until it occurs again? I really appreciate your quick reply.

I use PTVS everyday for my job and I really want to make it work smoothly. There are other issues I have not commented on, I am sure they are known (refactoring, debugging).

Jul 22, 2013 at 12:17 AM
bill - please let us know about the other problems you've run into (just in case). we'd like to fix as many bugs as possible for RC. thx.
Jul 22, 2013 at 3:46 PM
Glad to help. Do you have jira project or someplace you track known issues?

Jul 22, 2013 at 4:25 PM
It's right here. Click on "ISSUES" at the top of this page and you'll see "New Issue" directly below it.
Aug 1, 2013 at 11:03 PM
Finally it happened again. Just start the debugger, the startup project is set correctly to demonstrate the error message. Please let me know if you are able to recreate the problem.
Bill Gale

Aug 2, 2013 at 12:04 AM
Can you see what errors are listed in the Error List?
Aug 2, 2013 at 2:19 PM
Yes. At the time the popup was reporting errors the Error list had at least 10 errors listed. I did not confirm them. I close vs immediately and zipped the solution for you.

The crazy part as I said is when o reopened the solution the build was back to clean again.

Sent from my Windows Phone

From: Zooba
Sent: 8/1/2013 6:04 PM
To: [email removed]
Subject: Re: PTVS Launch With Errors? [pytools:450695]

From: Zooba

Can you see what errors are listed in the Error List?
Aug 2, 2013 at 2:20 PM
In case this occurs again would it be better to zip the solution with vs still open?

Sent from my Windows Phone

From: Zooba
Sent: 8/1/2013 6:04 PM
To: [email removed]
Subject: Re: PTVS Launch With Errors? [pytools:450695]

From: Zooba

Can you see what errors are listed in the Error List?
Aug 2, 2013 at 2:38 PM
Best to see what the errors are and double click them to see what file they're in. I suspect that they're not part of your project, but we may be including them automatically sometimes.

Zipping the project is probably not going to be helpful, unless the errors are in your project but don't show up all the time.
Aug 2, 2013 at 3:50 PM
Today the error popup reappeared (briefly). The specifics are in the ReadMe file.

Yesterday's issues were indeed in an external python file that was on the search path for the project but in a file that was not reference by the project. It's kind of a nice service regardless, so I cleaned up that error and the Error List was empty from that point forward.

Then the popup reappeared. With the Error List empty. I zipped up the open solution, closed vs, zipped again, reopened, and the popup was gone.

Aug 2, 2013 at 4:58 PM
I can't actually see the file you're referring to. If you're attaching them to your replies to the notification emails, be aware that these add your text at but the attachments are gone.

To send us an attachment, email If you have details to include in text, and there's no sensitive content, we'd prefer if they were just posted as the text of your reply so that other people who run into these issues can see them.
Aug 2, 2013 at 10:48 PM
I got your project.

The good news is that I can't reproduce the issue, so it may have been resolved. We made quite a few fixes relating to files being included in the project when they should be ignored, and I suspect that is the reason. I can't resolve the search paths though, so I can't be certain that it isn't related to that.

For now, is disabling that dialog a suitable workaround?

When we release our next update, it would be helpful if you could reenable it and see if it has been resolved. The option is "Prompt before running when errors are present" in Tools->Options->Python Tools->Advanced (or Debugging, after the update is released).