PTVS
PTVS copied to clipboard
Python 3.10 fails to hit breakpoints when "Native Code Debugging" is enabled.
Describe the bug
Install Python 3.10 from https://www.python.org/
Steps to Reproduce
- Create a Python Application project, add simple Python code.
from math import cos, radians
# Create a string with spaces proportional to a cosine of x in degrees
def make_dot_string(x):
rad = radians(x) # cos works with radians
numspaces = int(20 * cos(radians(x)) + 20) # scale to 0-40 spaces
st = ' ' * numspaces + 'o' # place 'o' after the spaces
return st
def main():
for i in range(0, 1800, 12):
s = make_dot_string(i)
print(s)
main()
- Enable "Native Code Debugging" in project settings / debug page.
- Set breakpoint and start debugging.
Expected behavior
Breakpoint should be hit.
Additional context and screenshots
Breakpoint can not be hit.
Output info
'python.exe' (Win32): Loaded 'C:\Python310-64\python.exe'.
'python.exe' (Win32): Loaded 'C:\Windows\System32\ntdll.dll'.
'python.exe' (Win32): Loaded 'C:\Windows\System32\kernel32.dll'.
'python.exe' (Win32): Loaded 'C:\Windows\System32\KernelBase.dll'.
'python.exe' (Win32): Loaded 'C:\Windows\System32\ucrtbase.dll'.
'python.exe' (Win32): Loaded 'C:\Python310-64\vcruntime140.dll'.
'python.exe' (Win32): Loaded 'C:\Python310-64\python310.dll'.
'python.exe' (Win32): Loaded 'C:\Windows\System32\ws2_32.dll'.
'python.exe' (Win32): Loaded 'C:\Windows\System32\version.dll'.
'python.exe' (Win32): Loaded 'C:\Windows\System32\rpcrt4.dll'.
'python.exe' (Win32): Loaded 'C:\Windows\System32\msvcrt.dll'.
'python.exe' (Win32): Loaded 'C:\Windows\System32\advapi32.dll'.
'python.exe' (Win32): Loaded 'C:\Windows\System32\sechost.dll'.
'python.exe' (Win32): Loaded 'C:\Windows\System32\cryptsp.dll'.
'python.exe' (Win32): Loaded 'C:\Windows\System32\rsaenh.dll'.
'python.exe' (Win32): Loaded 'C:\Windows\System32\bcrypt.dll'.
'python.exe' (Win32): Loaded 'C:\Windows\System32\cryptbase.dll'.
'python.exe' (Win32): Loaded 'C:\Windows\System32\bcryptprimitives.dll'.
'python.exe' (Win32): Loaded 'C:\Windows\System32\kernel.appcore.dll'.
The thread 0xa58 has exited with code 0 (0x0).
The thread 0x18bc has exited with code 0 (0x0).
The thread 0x4ebc has exited with code 0 (0x0).
The program '[12416] python.exe' has exited with code 0 (0x0).
Can you check if Python symbols were loaded correctly for python310.dll? You should be able to see it in the Modules window (under Debug -> Windows).
The Module window is shown below.
This issue also can reproduce on Python3.8.
We need to figure out whether we're planning to support 3.10 for this feature.
@judej @cwebster-99 We need some PM guidance on this. Are we planning on supporting mixed mode debugging for 3.10?