Commit graph

2070 commits

Author SHA1 Message Date
Conrad Irwin
0d65353cc6
Fix attach to process on arm64 Mac. (#1917)
* Before this change it was not possible to attach to a process on arm64 mac.

The primary issue was that we weren't building the attach.dylib for all targets; but even once we did that we had to ensure that we were exiting successfully after injecting into the process.

We pulled in the compile changes from 2e7109f6fe

Co-authored-by: @artemmukhin <Artem.Mukhin@jetbrains.com>
Co-authored-by: Cole Miller <cole@zed.dev>

* Use g++ on macOS (with -D_FORTIFY_SOURCE=2)

---------

Co-authored-by: @artemmukhin <Artem.Mukhin@jetbrains.com>
Co-authored-by: Cole Miller <cole@zed.dev>
2025-06-26 11:02:37 -07:00
MichaelSpece
99b202ee21
microsoft/debugpy#1898 Fix. (#1899) 2025-05-27 09:34:57 -07:00
rabbit
34d5de99a0
IPv6 support (#1896)
* Add initial support for IPv6

* address comments (part 1)

* quick clean up of missed fix suggestion

* Fix misassigned default serving server address in adapter client

* add wrapper method to get host and port from`getsockname`
2025-05-22 13:04:11 -07:00
Rich Chiodo
4bc7343c05
Fix 3.14 beta break with _handle on thread (#1895) 2025-05-19 11:12:37 -07:00
Rich Chiodo
8b5b84aec3
Update flags (#1889) 2025-04-10 11:38:49 -07:00
lachalek
644349da3e
feat: add monkey_patch_os for posix_spawnp (#1885)
* add monkey patch for posix_spawnp

* remove check for IS_PY38_OR_GREATER

---------

Co-authored-by: lydiachalek <lydiaboyd30@gmail.com>
2025-04-02 12:02:11 -07:00
Jonas Jelten
2d220f8db8
add debugpy-adapter entrypoint (#1870) 2025-03-13 08:59:39 -07:00
Rich Chiodo
f7d8963f99
Account for the scope when changing variables (#1869)
* Support using scope during setVariable request

* Fix other overloads to accept scope too

* Use 3.9 compatible unions

* Review feedback

* Pydevd test wasn't actually validating
2025-03-10 16:15:23 -07:00
Rich Chiodo
e01e6dd8a9
Get rid of silly raise/except clause (#1865) 2025-03-07 16:55:50 -08:00
Rich Chiodo
24001704d8
Try making the test_cli tests more robust on Python 3.13 (#1864) 2025-03-07 15:41:52 -08:00
Matej Aleksandrov
f054965148
Ensure Debugpy closes connection after a disconnect response (#1859)
* Ensure Debugpy closes connection after a disconnect response

* Moved disconnect fix from messaging to Client.disconnect_request
2025-03-07 11:14:32 -08:00
Rich Chiodo
96de4376a5
Fix binskim warnings for mac, linux, and pyd files (#1856)
* Add controlflow guard to linux, mac, and pyd files

* Fix manylinux too

* Fix pydevd bits too
2025-03-04 16:04:14 -08:00
Rich Chiodo
ed9f2949f6
Handle invalid __getattribute__ functions (#1833)
* Handle invalid `__getattribute__` functions

Addresses https://github.com/microsoft/debugpy/issues/1832

* Update src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_net_command.py

Co-authored-by: Mike Fährmann <mike_faehrmann@web.de>

---------

Co-authored-by: Mike Fährmann <mike_faehrmann@web.de>
2025-02-12 14:43:30 -08:00
bersbersbers
fb0b06cab1
Suppress warning on exit by properly closing pydevd socket (#1826)
* Fix #1812, first try

* Prevent tries to close socket multiple times
2025-02-05 09:53:37 -08:00
Karthik Nadig
4c226dd7e9
Add Terminate Debuggee capability (#1824) 2025-02-04 09:04:06 -08:00
Rich Chiodo
40a471e24a
Fix matplotlib backend computation (#1811)
* Fix matplotlib backend computation and problem found with just my code fix

* Remove extra logging
2025-01-15 09:42:03 -08:00
Rich Chiodo
d266361676
Allow relative paths in the 'remotePath' for a launch.json (#1803)
* Allow relative paths and add more logging for path issues

* Revert "Allow relative paths and add more logging for path issues"

This reverts commit a3956e4753.

* Allow relative paths and add more logging for path issues

* Add case test

* Missed some spots

* Invalid variable name

* Func doesn't return tuple
2025-01-09 14:32:39 -08:00
Rich Chiodo
02723de140
Fix multithreading stepping in 3.12 and later (#1798)
* Fix multithreaded stepping to not have 'return' events when a thread is already suspended

* Update after removing blank line

* Remove unnecessary change for start method
2025-01-07 11:25:54 -08:00
Rich Chiodo
7597262c80
Fix pyqt6 loader on windows (#1797) 2025-01-07 09:49:46 -08:00
Gary Miguel
cc85ca8e01
Handle new matplotlib versions (#1791)
Fixes: https://github.com/microsoft/debugpy/issues/1623
2025-01-06 09:47:23 -08:00
Rich Chiodo
24aa6a5f8e
Fix problem with just my code being ignored during stepping (#1786) 2024-12-19 08:32:04 -08:00
Adam Yoblick
34cc53b2ac
Merge pull request #1779 from microsoft/remove_bytecode_distinfo
Remove bytecode distinfo causing PyPi publish errors and ignore it from now on
2024-12-12 16:28:51 -06:00
Adam Yoblick
a99d933411 Remove bytecode distinfo causing PyPi publish errors and ignore it from now on 2024-12-12 15:44:37 -06:00
Luke Riddle
5014f2538a
Properly update pydevd._settrace.called (#1751)
* Properly update pydevd._settrace.called

* Change _settrace.called to _listen.called

* Remove unnecessary underscore from listen

* Fix lint issues

* Update multiple listen test
2024-12-06 14:48:58 -08:00
Rich Chiodo
43f41029ea
Make sure attach binaries are built before running tox (#1753)
* Make sure attach binaries are built before running tox

* Fix errors on 3.13
2024-12-03 15:27:42 -08:00
Luke Riddle
a78e5c28cd
Fix path modification for windows filesystems that can't handle .. (#1752) 2024-12-03 10:09:32 -08:00
Rich Chiodo
3823aba95e
Fix problem with lineno being none when generating traceback (#1750)
* Fix problem with lineno being none when generating traceback

Fixes https://github.com/microsoft/debugpy/issues/1745

* Improve multiline statement handling in stack summary
2024-12-02 11:57:30 -08:00
Rich Chiodo
f4ba976121
Subrepo command wasn't checked in correctly (#1737)
* Remove subrepo

* Fix subrepo
2024-11-18 09:50:34 -08:00
Rich Chiodo
73be8fb5df
Takes some changes from pydevd to fix line numbers being None (#1734)
* Add missing subrepo tools

* Update parent

* git subrepo commit (merge) src/debugpy/_vendored/pydevd

subrepo:
  subdir:   "src/debugpy/_vendored/pydevd"
  merged:   "c81fc701"
upstream:
  origin:   "https://github.com/fabioz/PyDev.Debugger.git"
  branch:   "main"
  commit:   "d0f81de4"
git-subrepo:
  version:  "0.4.9"
  origin:   "???"
  commit:   "???"

* Update sys_monitoring c file

* Try avoiding test errors on shutdown

* Try fixing case where closing early

* Run PRs everywhere
2024-11-14 16:22:19 -08:00
Rich Chiodo
3573ca0e2b
Remove compiled files (#1723) 2024-11-07 15:11:48 -08:00
Adam Yoblick
7d0ff33340
Merge pull request #1725 from microsoft/publish_pydevd_binaries 2024-11-07 15:02:49 -06:00
Adam Yoblick
af0d29f6bc Missed some quotes 2024-11-07 10:07:15 -06:00
Adam Yoblick
cebb7475a3 Remove redundant double quotes 2024-11-07 10:06:43 -06:00
Adam Yoblick
2036f44606 Change job names in build matrix 2024-11-07 10:02:43 -06:00
Adam Yoblick
22fbc53ee3 Move lint and pydevd to their own stages 2024-11-07 09:53:16 -06:00
Adam Yoblick
37eaf86e1a Copy downloaded binaries to the right place before running tests 2024-11-06 16:56:49 -06:00
Adam Yoblick
db63cd5bd1 build pydevd biniaries, publish them, and download them in later jobs 2024-11-06 16:47:11 -06:00
Adam Yoblick
abf4bb651a
Merge pull request #1722 from microsoft/build_pydevd_binaries
Build pydevd binaries before running tests
2024-11-05 14:25:29 -06:00
Adam Yoblick
1eb92e64b1 Fix bad paths 2024-11-05 13:33:38 -06:00
Adam Yoblick
8f2aed19da Build pydevd binaries before running tests 2024-11-05 13:18:52 -06:00
Rich Chiodo
740fa9dd5a
In 3.12 findlinestarts seems to return None for line more often (#1721) 2024-11-04 11:19:37 -08:00
Adam Yoblick
6a7f7c0f2d
Merge pull request #1718 from microsoft/remove_pydevd_workflow
Remove pydevd workflow since we build these as part of CI now
2024-11-01 17:20:42 -05:00
Adam Yoblick
b028e5c039 Remove pydevd workflow since we build these as part of CI now 2024-10-31 16:55:06 -05:00
Rich Chiodo
064a78f9cb
Update instructions for pushing changes to PyDev.Debugger (#1715)
* Update instructions

* Update attach to process.yml

* Update binaries
2024-10-30 15:51:36 -07:00
Rich Chiodo
a7d5a7ec12
Use subrepo to link to PyDev.Debugger instead of copying it (#1714)
* Remove copy of pydevd and add subrepo script

* git subrepo clone https://github.com/fabioz/PyDev.Debugger.git src/debugpy/_vendored/pydevd

subrepo:
  subdir:   "src/debugpy/_vendored/pydevd"
  merged:   "7d6e6e68"
upstream:
  origin:   "https://github.com/fabioz/PyDev.Debugger.git"
  branch:   "main"
  commit:   "7d6e6e68"
git-subrepo:
  version:  "0.4.9"
  origin:   "???"
  commit:   "???"

* Add binskim settings to match debugpy

* git subrepo clone --force https://github.com/fabioz/PyDev.Debugger.git src/debugpy/_vendored/pydevd

subrepo:
  subdir:   "src/debugpy/_vendored/pydevd"
  merged:   "cf2e47cb"
upstream:
  origin:   "https://github.com/fabioz/PyDev.Debugger.git"
  branch:   "main"
  commit:   "cf2e47cb"
git-subrepo:
  version:  "0.4.9"
  origin:   "???"
  commit:   "???"

* Remove unnecessary string test by removing the lambda in pydevd_sys_monitoring

* Fix linter

* Put back the fix in qt_loaders

* Put back binskim flag
2024-10-29 13:32:30 -07:00
Rich Chiodo
8ab4ee89e9
Try to get more logging from 3.13 failures (#1711)
* Add more logging for 313 failure

* Auto retry failures

* Add retry for socket.write

* Put watchdog timeout back and drop errors

* Fix linter

* Add message on error so at least it's logged

* Try a different combination

* Fix linter

* Go back to longer watchdog

* Try a different tactic

* Don't log failure and wait a bit in the watchdog

* Go back to the NoMoreMessages

* Just disable watchdog in 3.13 for now

* Change watchdog timeout

* Try different algorithm for ports in use

* Add retries option

* Fix usages of get_test_server_port

* Retries don't seem to work at global level with xdist, use retries on individual tests
2024-10-24 11:08:42 -07:00
Sarkis Ter Martirosyan
e3c68e9ea9
Check for imp availability (due to removal in Python 3.12) and use importlib if necessary. (#1569) 2024-10-22 16:38:54 -07:00
Adam Yoblick
462d99aa8d
Merge pull request #1705 from microsoft/fix_binskim_warnings
Fix binskim warnings
2024-10-22 16:22:54 -05:00
Tim Felgentreff
d07f941e12
Support GraalPy (#1704)
Co-authored-by: Rich Chiodo false <rchiodo@microsoft.com>
2024-10-21 13:22:10 -07:00
Adam Yoblick
281d5057cc Merge branch 'main' into fix_binskim_warnings 2024-10-21 13:12:58 -05:00