Skip to content

"One or more errors occurred" error pops up when attach a running python.exe. #8625

Closed

Description

@linette-zyy

Environment
Build of Visual Studio: 18.12.0 Canary [12218.276.main]
Build of Python Package: 18.0.26263.1
Version of Pylance: 2026.3.104
OS version: Windows 11 Enterprise, version 25H2

Steps to Reproduce

  1. Launch VS and create new python application
  2. Type the code as following or the code you are desiring
	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. Add an input('>') at the top of your code
  2. Add some more python code after that with breakpoint(s)
  3. Start WITHOUT debugging a. Console will wait for you to input something
  4. Debug > Attach to Process, select the appropriate python.exe
  5. Observes
Image

Expected behavior
It stops at the breakpoint

Additional context and screenshots
"One or more errors occurred" error pops up
Image

Activity

  1. rchiodo commented on Sep 21, 2026

    @rchiodo
    Contributor

    The python app crashed, the popup is expected. Not sure what caused the python app to crash though. Does it crash without attaching a debugger?

  2. linette-zyy commented on Sep 22, 2026

    @linette-zyy
    Author

    Rich Chiodo (@rchiodo)
    It doesn't cash without attaching a debugger and it also doesn't cash when attach remote debug.
    Image

  3. StellaHuang95 commented on Oct 13, 2026

    @StellaHuang95
    Contributor

    linette-zyy Please try with Python 3.10 or higher again.

  4. linette-zyy commented on Oct 15, 2026

    @linette-zyy
    Author

    Stella Huang (@StellaHuang95) This issue also repro on Python3.10 or higher.
    Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions