3

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.

1 Answer 1

3

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.

Sign up to request clarification or add additional context in comments.

3 Comments

Thanks for your answer. I had set break points at the wrong part of code. And How Do you mark my app as a windows application in project properties? I tried searching but didn't get any option.
If you right click on your project and choose Properties in the "General" tab there's a "Windows Application" checkbox below Working Directory.
I have Checked it as a windows application in properties, now i dont get the Console window but the debugging process gets stopped at a point and doesnt move. Why is it so?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.