Problems with mixed mode debugging

Aug 15 at 11:25 AM
Hi,
I am trying to run mixed mode debugging with Visual Studio 2013 R3 and PTVS 2.1 RC1 on a Windows 7 computer.

When running the following simple program i cannot halt at a break point
x = 1
while True:
    x = x+1
The "modules" tab shows that the symbols for "Python.exe", "Python33.dll" and "Microsoft.Python.Tools.Debugger.Helper.x86.dll" has been loaded. There is no "unknown" module though, that I think has been there on another computer I use (Win 8.1).

I would be very grateful for any help with this, thanks.
Aug 15 at 11:29 AM
To be more specific, I cannot see my own file in modules, and the call stack looks like this:
>   python33.dll!PyNumber_Add(_object * v, _object * w) Line 864    C
    python33.dll!PyEval_EvalFrameEx(_frame * f, int throwflag) Line 1526    C
    python33.dll!PyEval_EvalCodeEx(_object * _co, _object * globals, _object * locals, _object * * args, int argcount, _object * * kws, int kwcount, _object * * defs, int defcount, _object * kwdefs, _object * closure) Line 3436 C
    python33.dll!PyEval_EvalCode(_object * co, _object * globals, _object * locals) Line 776    C
    python33.dll!run_mod(_mod * mod, const char * filename, _object * globals, _object * locals, PyCompilerFlags * flags, _arena * arena) Line 1996 C
    python33.dll!PyRun_FileExFlags(_iobuf * fp, const char * filename, int start, _object * globals, _object * locals, int closeit, PyCompilerFlags * flags) Line 1953  C
    python33.dll!PyRun_SimpleFileExFlags(_iobuf * fp, const char * filename, int closeit, PyCompilerFlags * flags) Line 1453    C
    python33.dll!PyRun_AnyFileExFlags(_iobuf * fp, const char * filename, int closeit, PyCompilerFlags * flags) Line 1174   C
    python33.dll!run_file(_iobuf * fp, const wchar_t * filename, PyCompilerFlags * p_cf) Line 307   C
    python33.dll!Py_Main(int argc, unsigned short * * argv) Line 744    C
    python.exe!__tmainCRTStartup() Line 552 C
    [External Code] 
    [Frames below may be incorrect and/or missing, no symbols loaded for kernel32.dll]  
Coordinator
Aug 15 at 5:02 PM
Hm... This stack definitely indicates that the Python portion of the debugger is not active at all.

Are you launching your program from VS, or attaching to a running one? If it's one of these, can you try the other and see if it makes a difference?
Aug 18 at 8:13 AM
Hi, thanks for the reply. It doesn't work either way. When attaching to an externally started program it is not possible to hit a breakpoint in python. Breaking gets me this call stack:
python33.dll!x_add(_longobject * a, _longobject * b) Line 2857  C
python33.dll!long_add(_longobject * a, _longobject * b) Line 2949   C
python33.dll!binary_op1(_object * v, _object * w, const int op_slot) Line 729   C
python33.dll!PyNumber_Add(_object * v, _object * w) Line 864    C
python33.dll!PyEval_EvalFrameEx(_frame * f, int throwflag) Line 1526    C
python33.dll!PyEval_EvalCodeEx(_object * _co, _object * globals, _object * locals, _object * * args, int argcount, _object * * kws, int kwcount, _object * * defs, int defcount, _object * kwdefs, _object * closure) Line 3436 C
python33.dll!PyEval_EvalCode(_object * co, _object * globals, _object * locals) Line 776    C
python33.dll!run_mod(_mod * mod, const char * filename, _object * globals, _object * locals, PyCompilerFlags * flags, _arena * arena) Line 1996 C
python33.dll!PyRun_FileExFlags(_iobuf * fp, const char * filename, int start, _object * globals, _object * locals, int closeit, PyCompilerFlags * flags) Line 1953  C
python33.dll!PyRun_SimpleFileExFlags(_iobuf * fp, const char * filename, int closeit, PyCompilerFlags * flags) Line 1453    C
python33.dll!PyRun_AnyFileExFlags(_iobuf * fp, const char * filename, int closeit, PyCompilerFlags * flags) Line 1174   C
python33.dll!run_file(_iobuf * fp, const wchar_t * filename, PyCompilerFlags * p_cf) Line 307   C
python33.dll!Py_Main(int argc, unsigned short * * argv) Line 744    C
python.exe!__tmainCRTStartup() Line 552 C
[External Code] 
[Frames below may be incorrect and/or missing, no symbols loaded for kernel32.dll]