Commit graph

2078 commits

Author SHA1 Message Date
Bill Schnurr
6cbdf8767e
update testing for python 3.14 (#1955)
Some checks failed
Code scanning - action / CodeQL-Build (push) Has been cancelled
* update testing for python 3.14

* Allow python 3.14 in attach code

* move 3.14 to its own job outside of matrix

* try 3.14.0-rc.2

* allowUnstable

* use 3.14.0-rc.2 but use 3.14 in tests
2025-09-05 09:14:53 -07:00
timrid
2eb3afede0
Check if os.__file__ is available before using it (#1944)
* check if os.file is available before using it

* use threading.__file__ als last fallback
2025-08-12 13:25:06 -07:00
Piotr Osiewicz
b00a812997
pydevd: Fix up prefix of attach shared library for Windows (#1939)
Follow-up to #1917, which changed the prefix for Windows. The crux of that contribution was about enabling attaching on Sillicon Mac (in fact, it came from my colleagues at Zed Industries). This however broke .dll lookup per https://github.com/zed-industries/zed/pull/35640#issuecomment-3155624377
2025-08-05 11:08:32 -07:00
Jordan Borean
1aff9aa541
Expose CLI Options through public API (#1928)
* Expose CLI Options through public API

Expose a public API that can retrieve the processed CLI options for the
current process launched through the debugpy CLI. This enables code to
be able to retrieve options like the port and adapter access token to be
used for launching their own child process' that can be debugged.

* Fix test by sending dict not dataclass object
2025-07-15 15:56:03 -07:00
Anuraag (Rag) Agrawal
ead90f6f71
Fix round-robin CI script when state issue has no assignees (#1930) 2025-07-15 09:47:51 -07:00
Jordan Borean
2b1e361eac
Document --adapter-access-token CLI arg (#1927) 2025-07-15 09:46:03 -07:00
Jordan Borean
ea1dd9a838
Fix debugger stepping actions in forked process (#1921)
* Fix debugger stepping actions in forked process

Fix the debugger stepping state when debugging a process that has been
forked from the main process. The new sys.monitoring mechanism didn't
fully clear the thread local storage after a fork leading to a state
where the forked child process tracked the wrong thread information and
was never updated on the latest continue action.

* Add stepping test for forked process

* Add line ending back in for cleaner diff

* More formatting reversions
2025-07-08 10:47:47 -07:00
Jordan Borean
b387710b7f
Add parent-session-pid argument (#1920)
* Add parent-session-pid argument

Add the ability to specify the parent process id when connecting a new
DAP server to the client. This value is used instead of the actual
process' parent id so that it can be associated with a specific debug
session even if it hasn't been spawned directly by that parent process.

* Add tests for new option
2025-07-07 09:52:53 -07:00
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