Skip to content

Commit 9aea41b

Browse files
Merge pull request #2 from phuongdnguyen/python-debugger
Make DAP debuggers generic
2 parents 07d2841 + 16dc176 commit 9aea41b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+4657
-311
lines changed

.gitignore

Lines changed: 208 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,211 @@ delve.build
66
stderr.txt
77
stdout.txt
88
tdlv.build
9-
jetbrains-plugin/.gradle/**
9+
jetbrains-plugin/.gradle/**
10+
11+
12+
# Python
13+
14+
# Byte-compiled / optimized / DLL files
15+
__pycache__/
16+
*.py[codz]
17+
*$py.class
18+
19+
# C extensions
20+
*.so
21+
22+
# Distribution / packaging
23+
.Python
24+
build/
25+
develop-eggs/
26+
dist/
27+
downloads/
28+
eggs/
29+
.eggs/
30+
lib/
31+
lib64/
32+
parts/
33+
sdist/
34+
var/
35+
wheels/
36+
share/python-wheels/
37+
*.egg-info/
38+
.installed.cfg
39+
*.egg
40+
MANIFEST
41+
42+
# PyInstaller
43+
# Usually these files are written by a python script from a template
44+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
45+
*.manifest
46+
*.spec
47+
48+
# Installer logs
49+
pip-log.txt
50+
pip-delete-this-directory.txt
51+
52+
# Unit test / coverage reports
53+
htmlcov/
54+
.tox/
55+
.nox/
56+
.coverage
57+
.coverage.*
58+
.cache
59+
nosetests.xml
60+
coverage.xml
61+
*.cover
62+
*.py.cover
63+
.hypothesis/
64+
.pytest_cache/
65+
cover/
66+
67+
# Translations
68+
*.mo
69+
*.pot
70+
71+
# Django stuff:
72+
*.log
73+
local_settings.py
74+
db.sqlite3
75+
db.sqlite3-journal
76+
77+
# Flask stuff:
78+
instance/
79+
.webassets-cache
80+
81+
# Scrapy stuff:
82+
.scrapy
83+
84+
# Sphinx documentation
85+
docs/_build/
86+
87+
# PyBuilder
88+
.pybuilder/
89+
target/
90+
91+
# Jupyter Notebook
92+
.ipynb_checkpoints
93+
94+
# IPython
95+
profile_default/
96+
ipython_config.py
97+
98+
# pyenv
99+
# For a library or package, you might want to ignore these files since the code is
100+
# intended to run in multiple environments; otherwise, check them in:
101+
# .python-version
102+
103+
# pipenv
104+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
105+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
106+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
107+
# install all needed dependencies.
108+
#Pipfile.lock
109+
110+
# UV
111+
# Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
112+
# This is especially recommended for binary packages to ensure reproducibility, and is more
113+
# commonly ignored for libraries.
114+
#uv.lock
115+
116+
# poetry
117+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
118+
# This is especially recommended for binary packages to ensure reproducibility, and is more
119+
# commonly ignored for libraries.
120+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
121+
#poetry.lock
122+
#poetry.toml
123+
124+
# pdm
125+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
126+
# pdm recommends including project-wide configuration in pdm.toml, but excluding .pdm-python.
127+
# https://pdm-project.org/en/latest/usage/project/#working-with-version-control
128+
#pdm.lock
129+
#pdm.toml
130+
.pdm-python
131+
.pdm-build/
132+
133+
# pixi
134+
# Similar to Pipfile.lock, it is generally recommended to include pixi.lock in version control.
135+
#pixi.lock
136+
# Pixi creates a virtual environment in the .pixi directory, just like venv module creates one
137+
# in the .venv directory. It is recommended not to include this directory in version control.
138+
.pixi
139+
140+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
141+
__pypackages__/
142+
143+
# Celery stuff
144+
celerybeat-schedule
145+
celerybeat.pid
146+
147+
# SageMath parsed files
148+
*.sage.py
149+
150+
# Environments
151+
.env
152+
.envrc
153+
.venv
154+
env/
155+
venv/
156+
ENV/
157+
env.bak/
158+
venv.bak/
159+
160+
# Spyder project settings
161+
.spyderproject
162+
.spyproject
163+
164+
# Rope project settings
165+
.ropeproject
166+
167+
# mkdocs documentation
168+
/site
169+
170+
# mypy
171+
.mypy_cache/
172+
.dmypy.json
173+
dmypy.json
174+
175+
# Pyre type checker
176+
.pyre/
177+
178+
# pytype static type analyzer
179+
.pytype/
180+
181+
# Cython debug symbols
182+
cython_debug/
183+
184+
# PyCharm
185+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
186+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
187+
# and can be added to the global gitignore or merged into this file. For a more nuclear
188+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
189+
#.idea/
190+
191+
# Abstra
192+
# Abstra is an AI-powered process automation framework.
193+
# Ignore directories containing user credentials, local state, and settings.
194+
# Learn more at https://abstra.io/docs
195+
.abstra/
196+
197+
# Visual Studio Code
198+
# Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore
199+
# that can be found at https://github.com/github/gitignore/blob/main/Global/VisualStudioCode.gitignore
200+
# and can be added to the global gitignore or merged into this file. However, if you prefer,
201+
# you could uncomment the following to ignore the entire vscode folder
202+
# .vscode/
203+
204+
# Ruff stuff:
205+
.ruff_cache/
206+
207+
# PyPI configuration file
208+
.pypirc
209+
210+
# Marimo
211+
marimo/_static/
212+
marimo/_lsp/
213+
__marimo__/
214+
215+
# Streamlit
216+
.streamlit/secrets.toml

Makefile

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
1-
simple:
2-
cd custom-debugger && go clean && go build -o ../tdlv.build && cd ../example/simple-workflow && ../../tdlv.build
1+
go-simple:
2+
cd custom-debugger && go clean && go build -o ../tdlv.build && cd ../example/go//simple-workflow && ../../tdlv.build --lang=go
33

4-
structured-ide-integrated:
5-
cd custom-debugger && go clean && go build -o ../tdlv.build && cd ../example/structured-workflow/replay-debug-ide-integrated && ../../../tdlv.build
4+
go-structured-ide-integrated:
5+
cd custom-debugger && go clean && go build -o ../tdlv.build && cd ../example/go/structured-workflow/replay-debug-ide-integrated && ../../../../tdlv.build --lang=go
66

7-
structured-standalone:
8-
cd custom-debugger && go clean && go build -o ../tdlv.build && cd ../example/structured-workflow/replay-debug-standalone && ../../../tdlv.build
7+
go-structured-standalone:
8+
cd custom-debugger && go clean && go build -o ../tdlv.build && cd ../example/go/structured-workflow/replay-debug-standalone && ../../../../tdlv.build --lang=go
9+
10+
python:
11+
cd custom-debugger && go clean && go build -o ../tdlv.build && cd .. && ./tdlv.build --lang=python
912

1013
build:
1114
cd custom-debugger && go clean && go build -o ../tdlv.build

custom-debugger/go.mod

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,16 @@ go 1.23.11
55
require (
66
github.com/go-delve/delve v1.25.0
77
github.com/google/go-dap v0.12.0
8-
github.com/stretchr/testify v1.10.0
8+
golang.org/x/tools v0.14.0
99
)
1010

1111
require (
1212
github.com/cilium/ebpf v0.11.0 // indirect
13-
github.com/davecgh/go-spew v1.1.1 // indirect
1413
github.com/hashicorp/golang-lru v1.0.2 // indirect
1514
github.com/mattn/go-isatty v0.0.20 // indirect
16-
github.com/pmezard/go-difflib v1.0.0 // indirect
1715
golang.org/x/arch v0.11.0 // indirect
1816
golang.org/x/exp v0.0.0-20230224173230-c95f2b4c22f2 // indirect
17+
golang.org/x/mod v0.20.0 // indirect
1918
golang.org/x/sys v0.26.0 // indirect
2019
golang.org/x/telemetry v0.0.0-20241106142447-58a1122356f5 // indirect
2120
gopkg.in/yaml.v3 v3.0.1 // indirect

custom-debugger/go.sum

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@ github.com/cilium/ebpf v0.11.0 h1:V8gS/bTCCjX9uUnkUFUpPsksM8n1lXBAvHcpiFk1X2Y=
22
github.com/cilium/ebpf v0.11.0/go.mod h1:WE7CZAnqOL2RouJ4f1uyNhqr2P4CCvXFIqdRDUgWsVs=
33
github.com/creack/pty v1.1.20 h1:VIPb/a2s17qNeQgDnkfZC35RScx+blkKF8GV68n80J4=
44
github.com/creack/pty v1.1.20/go.mod h1:MOBLtS5ELjhRRrroQr9kyvTxUAFNvYEK993ew/Vr4O4=
5-
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
6-
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
75
github.com/frankban/quicktest v1.14.5 h1:dfYrrRyLtiqT9GyKXgdh+k4inNeTvmGbuSgZ3lx3GhA=
86
github.com/frankban/quicktest v1.14.5/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0=
97
github.com/go-delve/delve v1.25.0 h1:JN2S3iVptvayUS2w+d0UEPmijgkodW1AFM4I8UViHGE=
@@ -20,21 +18,23 @@ github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
2018
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
2119
github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY=
2220
github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y=
23-
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
24-
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
2521
github.com/rogpeppe/go-internal v1.9.0 h1:73kH8U+JUqXU8lRuOHeVHaa/SZPifC7BkcraZVejAe8=
2622
github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs=
27-
github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA=
28-
github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
2923
golang.org/x/arch v0.11.0 h1:KXV8WWKCXm6tRpLirl2szsO5j/oOODwZf4hATmGVNs4=
3024
golang.org/x/arch v0.11.0/go.mod h1:FEVrYAQjsQXMVJ1nsMoVVXPZg6p2JE2mx8psSWTDQys=
3125
golang.org/x/exp v0.0.0-20230224173230-c95f2b4c22f2 h1:Jvc7gsqn21cJHCmAWx0LiimpP18LZmUxkT5Mp7EZ1mI=
3226
golang.org/x/exp v0.0.0-20230224173230-c95f2b4c22f2/go.mod h1:CxIveKay+FTh1D0yPZemJVgC/95VzuuOLq5Qi4xnoYc=
27+
golang.org/x/mod v0.20.0 h1:utOm6MM3R3dnawAiJgn0y+xvuYRsm1RKM/4giyfDgV0=
28+
golang.org/x/mod v0.20.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=
29+
golang.org/x/sync v0.8.0 h1:3NFvSEYkUoMifnESzZl15y791HH1qU2xm6eCJU5ZPXQ=
30+
golang.org/x/sync v0.8.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
3331
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
3432
golang.org/x/sys v0.26.0 h1:KHjCJyddX0LoSTb3J+vWpupP9p0oznkqVk/IfjymZbo=
3533
golang.org/x/sys v0.26.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
3634
golang.org/x/telemetry v0.0.0-20241106142447-58a1122356f5 h1:TCDqnvbBsFapViksHcHySl/sW4+rTGNIAoJJesHRuMM=
3735
golang.org/x/telemetry v0.0.0-20241106142447-58a1122356f5/go.mod h1:8nZWdGp9pq73ZI//QJyckMQab3yq7hoWi7SI0UIusVI=
36+
golang.org/x/tools v0.14.0 h1:jvNa2pY0M4r62jkRQ6RwEZZyPcymeL9XZMLBbV7U2nc=
37+
golang.org/x/tools v0.14.0/go.mod h1:uYBEerGOWcJyEORxN+Ek8+TT266gXkNlHdJBwexUsBg=
3838
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
3939
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
4040
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=

0 commit comments

Comments
 (0)