0

When I test a Python script in VS 2015, I can see some kind of error message flash on the console, then the console closes before I can look at it.

I've tried running it both with debugging (F5) and without (Ctrl-F5).

Putting some kind of delay in the last line of script doesn't appear to change things (unsurprising, since I'm sure the script doesn't execute that far.)

I've looked here Preventing console window from closing on Visual Studio C/C++ Console application

Some answers suggest changing a setting here:

Properties>Configuration Properties> Linker> System > 
select Console (/SUBSYSTEM:CONSOLE) in SubSystem option. 

...but my version of VS (Community 2015) doesn't have that same feature (at least, not that I can find). When I right-click and select Properties for this project, I get this:

screenshot

This answer: Python file closes instantly in MS visual studio 2015

...looked promising, but I already have looked at that setting:

Python Tools screenshot

Community
  • 1
  • 1
Suzanne
  • 582
  • 2
  • 11
  • 31
  • maybe it doesn't work when the python file has a syntax error. Can you post it here? – Jean-François Fabre Dec 19 '16 at 21:07
  • The error is "AttributeError: 'str' objcet has no attribute 'read'." That's a simple error I can fix. But in order to find out what it was that flashed in the console, I had to **video-screen-capture the output at 60 fps then rewind the video to see** like a theatrical "zoom in and enhance" sequence! It'd be easier if the console just "stuck." On another computer running VS 2015, it doesn't do this. It's gotta be a weird setting somewhere. – Suzanne Dec 19 '16 at 21:28
  • okay, you're probably right. Another way of workarounding this would be to run your .py file in a CMD console. Much easier than capturing the screen. – Jean-François Fabre Dec 19 '16 at 21:35

0 Answers0