Question

I have integrated PTVS into Visual studio so that i can have intellisense support and debugging capability. I set Breakpoints at Function definitions, but when i debug the control goes directly out of function. And in some points the Console window pops up and it never iterates to the next line of code. I liked PTVS but this thing has stuck me up. In options->Python tools-> Interpreter options i have set it as Python 2.7 Can Anyone tell me whats wrong with the options and why that console screen is appearing.

Thanks in advance.

Was it helpful?

Solution

When you say you're setting breakpoint at function definitions do you mean on the line with the "def ..." or are you setting the breakpoint on the 1st statement of the function?

In Python functions are executable statements so if you're putting the breakpoint on the def line then you're going to hit the breakpoint when the function is being defined rather than being executed.

As far as the console window it will generally open unless you mark your app as a Windows application in project properties (this will launch pythonw.exe which doesn't include a console window).

If that doesn't help you might want to post the code you're having trouble with or a screenshot of the code with where the breakpoints are set.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top