This project has moved. For the latest updates, please go here.

Mixed Mode + Edit and Continue

Aug 21, 2014 at 12:28 AM
I spent a LOT of time trying to figure out why I couldn't make the debugger stop in Python code when "Enable native code debugging" was checked in the Python project. It stopped in C code with it checked, or in Python with it unchecked, but not both.

Turns out for me,
Tools->Options->Debugging->Edit and Continue->Enable native Edit and Continue
needs to be disabled. I don't mind not having E&C available for this scenario, although I always have it enabled, as it's one of the top features of VS in my opinion. So of course I had it on, as it's a global setting.

I didn't see this mentioned anywhere, so maybe this will help someone else. I think a test and warning, or maybe just ignoring E&C automatically in a Python project, if possible, is a good idea.

GREAT work on PTVS so far. Despite the above, when I was first able to switch between Python and native code, I knew I was seeing something new and significant.

Any clues if native E&C can work in mixed mode?
Aug 21, 2014 at 12:37 AM
Edited Aug 21, 2014 at 12:38 AM
I have to admit that I was not even aware of the existence of this setting (or, indeed, this feature). So all the development, and all our testing so far, was done with its default setting - which is off.

I poked around a little bit, and it seems that this is one of the switches that the new native debugging engine, which permits arbitrary mixing of different code types, simply doesn't support, so when you enable it, it switches to using the old engine. It's probably why this thing is off by default. Note that it means that enabling it is not actually free - you'll basically lose all of the new native debugger features if you go that way (e.g. natvis visualizers). I would imagine that, eventually, they'll reimplement it in the new engine, and then flip that switch back on (and then it'll work with our mixed mode debugger, as well).

Thanks for bringing it up - this is definitely something that should go into the docs.