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.

Jonas
  • 375
  • 2
  • 6
  • 20

1 Answers1

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.

Dino Viehland
  • 6,478
  • 20
  • 25
  • 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. – Jonas Mar 19 '14 at 08:38
  • 1
    If you right click on your project and choose Properties in the "General" tab there's a "Windows Application" checkbox below Working Directory. – Dino Viehland Mar 20 '14 at 03:48
  • 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? – Jonas Mar 20 '14 at 10:24