PTVS icon indicating copy to clipboard operation
PTVS copied to clipboard

Python 3.10 fails to hit breakpoints when "Native Code Debugging" is enabled.

Open ttSpace opened this issue 2 years ago • 7 comments

Describe the bug

image

Install Python 3.10 from https://www.python.org/

Steps to Reproduce

  1. 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()
  1. Enable "Native Code Debugging" in project settings / debug page.
  2. 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).

ttSpace avatar Mar 03 '22 08:03 ttSpace

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).

int19h avatar Mar 03 '22 19:03 int19h

The Module window is shown below.

image

ttSpace avatar Mar 04 '22 09:03 ttSpace

image This issue also can reproduce on Python3.8. Python3 8

linette-zyy avatar Mar 15 '22 05:03 linette-zyy

We need to figure out whether we're planning to support 3.10 for this feature.

int19h avatar May 18 '22 18:05 int19h

@judej @cwebster-99 We need some PM guidance on this. Are we planning on supporting mixed mode debugging for 3.10?

AdamYoblick avatar Feb 02 '23 22:02 AdamYoblick