briefcase-debugger 0.4.3__tar.gz → 0.4.5__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {briefcase_debugger-0.4.3/src/briefcase_debugger.egg-info → briefcase_debugger-0.4.5}/PKG-INFO +1 -1
- {briefcase_debugger-0.4.3 → briefcase_debugger-0.4.5}/pyproject.toml +6 -3
- {briefcase_debugger-0.4.3 → briefcase_debugger-0.4.5}/src/briefcase_debugger/__init__.py +4 -3
- {briefcase_debugger-0.4.3 → briefcase_debugger-0.4.5}/src/briefcase_debugger/debugpy.py +2 -1
- {briefcase_debugger-0.4.3 → briefcase_debugger-0.4.5/src/briefcase_debugger.egg-info}/PKG-INFO +1 -1
- briefcase_debugger-0.4.5/src/briefcase_debugger.egg-info/scm_version.json +8 -0
- {briefcase_debugger-0.4.3 → briefcase_debugger-0.4.5}/tests/test_debugpy.py +18 -10
- {briefcase_debugger-0.4.3 → briefcase_debugger-0.4.5}/tests/test_debugpy_path_mappings.py +66 -15
- {briefcase_debugger-0.4.3 → briefcase_debugger-0.4.5}/tests/test_pdb.py +4 -4
- briefcase_debugger-0.4.3/src/briefcase_debugger.egg-info/scm_version.json +0 -8
- {briefcase_debugger-0.4.3 → briefcase_debugger-0.4.5}/LICENSE +0 -0
- {briefcase_debugger-0.4.3 → briefcase_debugger-0.4.5}/README.md +0 -0
- {briefcase_debugger-0.4.3 → briefcase_debugger-0.4.5}/setup.cfg +0 -0
- {briefcase_debugger-0.4.3 → briefcase_debugger-0.4.5}/setup.py +0 -0
- {briefcase_debugger-0.4.3 → briefcase_debugger-0.4.5}/src/briefcase_debugger/config.py +0 -0
- {briefcase_debugger-0.4.3 → briefcase_debugger-0.4.5}/src/briefcase_debugger/pdb.py +0 -0
- {briefcase_debugger-0.4.3 → briefcase_debugger-0.4.5}/src/briefcase_debugger.egg-info/SOURCES.txt +0 -0
- {briefcase_debugger-0.4.3 → briefcase_debugger-0.4.5}/src/briefcase_debugger.egg-info/dependency_links.txt +0 -0
- {briefcase_debugger-0.4.3 → briefcase_debugger-0.4.5}/src/briefcase_debugger.egg-info/requires.txt +0 -0
- {briefcase_debugger-0.4.3 → briefcase_debugger-0.4.5}/src/briefcase_debugger.egg-info/scm_file_list.json +4 -4
- {briefcase_debugger-0.4.3 → briefcase_debugger-0.4.5}/src/briefcase_debugger.egg-info/top_level.txt +0 -0
- {briefcase_debugger-0.4.3 → briefcase_debugger-0.4.5}/tests/test_base.py +0 -0
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
[build-system]
|
|
2
2
|
requires = [
|
|
3
3
|
# keep versions in sync with automation/pyproject.toml and ../pyproject.toml
|
|
4
|
-
"setuptools==
|
|
5
|
-
"setuptools_scm==10.2.
|
|
4
|
+
"setuptools==84.0.0",
|
|
5
|
+
"setuptools_scm==10.2.1",
|
|
6
6
|
]
|
|
7
7
|
build-backend = "setuptools.build_meta"
|
|
8
8
|
|
|
@@ -23,7 +23,7 @@ debugpy = ["debugpy>=1.8.17,<2.0.0"]
|
|
|
23
23
|
|
|
24
24
|
[dependency-groups]
|
|
25
25
|
test = [
|
|
26
|
-
"coverage[toml] == 7.
|
|
26
|
+
"coverage[toml] == 7.16.0",
|
|
27
27
|
"pytest == 9.1.1",
|
|
28
28
|
"pytest-xdist == 3.8.0",
|
|
29
29
|
]
|
|
@@ -46,6 +46,9 @@ skip_covered = true
|
|
|
46
46
|
skip_empty = true
|
|
47
47
|
precision = 1
|
|
48
48
|
|
|
49
|
+
[tool.ruff]
|
|
50
|
+
extend = "../pyproject.toml"
|
|
51
|
+
|
|
49
52
|
[tool.ruff.lint]
|
|
50
53
|
ignore = [
|
|
51
54
|
"T20", # flake8-print (useful for briefcase, but not in the debugger)
|
|
@@ -16,7 +16,8 @@ def start_remote_debugger():
|
|
|
16
16
|
if config_str is None:
|
|
17
17
|
if verbose:
|
|
18
18
|
print(
|
|
19
|
-
"No 'BRIEFCASE_DEBUGGER' environment variable found.
|
|
19
|
+
"No 'BRIEFCASE_DEBUGGER' environment variable found. "
|
|
20
|
+
"Debugger not starting."
|
|
20
21
|
)
|
|
21
22
|
return # If BRIEFCASE_DEBUGGER is not set, this packages does nothing...
|
|
22
23
|
|
|
@@ -38,7 +39,7 @@ def start_remote_debugger():
|
|
|
38
39
|
start_pdb(config, verbose)
|
|
39
40
|
else:
|
|
40
41
|
raise ValueError(f"Unknown debugger '{config['debugger']}'")
|
|
41
|
-
except Exception:
|
|
42
|
-
# Show exception and stop the whole application when
|
|
42
|
+
except Exception: # noqa: BLE001
|
|
43
|
+
# Show exception and stop the whole application when any error occurs
|
|
43
44
|
print(traceback.format_exc())
|
|
44
45
|
sys.exit(-1)
|
|
@@ -82,7 +82,8 @@ def start_debugpy(config: DebuggerConfig, verbose: bool):
|
|
|
82
82
|
print("The debugpy server started. Waiting for debugger to attach...")
|
|
83
83
|
print(
|
|
84
84
|
f"""
|
|
85
|
-
To connect to debugpy using VS Code add the following configuration
|
|
85
|
+
To connect to debugpy using VS Code add the following configuration
|
|
86
|
+
to '.vscode/launch.json':
|
|
86
87
|
{{
|
|
87
88
|
"version": "0.2.0",
|
|
88
89
|
"configurations": [
|
|
@@ -3,9 +3,10 @@ import os
|
|
|
3
3
|
import sys
|
|
4
4
|
from unittest.mock import MagicMock
|
|
5
5
|
|
|
6
|
-
import briefcase_debugger
|
|
7
6
|
import debugpy
|
|
8
7
|
import pytest
|
|
8
|
+
|
|
9
|
+
import briefcase_debugger
|
|
9
10
|
from briefcase_debugger.config import AppPathMappings
|
|
10
11
|
|
|
11
12
|
|
|
@@ -32,9 +33,8 @@ def test_no_debugger_verbose(monkeypatch, capsys):
|
|
|
32
33
|
briefcase_debugger.start_remote_debugger()
|
|
33
34
|
|
|
34
35
|
captured = capsys.readouterr()
|
|
35
|
-
assert (
|
|
36
|
-
|
|
37
|
-
== "No 'BRIEFCASE_DEBUGGER' environment variable found. Debugger not starting.\n"
|
|
36
|
+
assert captured.out == (
|
|
37
|
+
"No 'BRIEFCASE_DEBUGGER' environment variable found. Debugger not starting.\n"
|
|
38
38
|
)
|
|
39
39
|
assert captured.err == ""
|
|
40
40
|
|
|
@@ -65,12 +65,18 @@ def test_no_debugger_verbose(monkeypatch, capsys):
|
|
|
65
65
|
host_folders=["/PROJECT_ROOT/src/helloworld"],
|
|
66
66
|
),
|
|
67
67
|
[
|
|
68
|
-
|
|
68
|
+
(
|
|
69
|
+
"/PROJECT_ROOT/build/helloworld/macos/app/"
|
|
70
|
+
"Hello World.app/Contents/Resources/app"
|
|
71
|
+
)
|
|
69
72
|
],
|
|
70
73
|
[
|
|
71
74
|
(
|
|
72
75
|
"/PROJECT_ROOT/src/helloworld",
|
|
73
|
-
|
|
76
|
+
(
|
|
77
|
+
"/PROJECT_ROOT/build/helloworld/macos/app/"
|
|
78
|
+
"Hello World.app/Contents/Resources/app/helloworld"
|
|
79
|
+
),
|
|
74
80
|
)
|
|
75
81
|
],
|
|
76
82
|
),
|
|
@@ -120,8 +126,9 @@ def test_with_debugger(
|
|
|
120
126
|
fake_debugpy_wait_for_client = MagicMock()
|
|
121
127
|
monkeypatch.setattr(debugpy, "wait_for_client", fake_debugpy_wait_for_client)
|
|
122
128
|
|
|
123
|
-
# pydevd is dynamically loaded and only available when a real debugger is attached.
|
|
124
|
-
# we fake the whole module, as otherwise the import in start_remote_debugger
|
|
129
|
+
# pydevd is dynamically loaded and only available when a real debugger is attached.
|
|
130
|
+
# So we fake the whole module, as otherwise the import in start_remote_debugger
|
|
131
|
+
# would fail
|
|
125
132
|
fake_pydevd = MagicMock()
|
|
126
133
|
monkeypatch.setitem(sys.modules, "pydevd", fake_pydevd)
|
|
127
134
|
fake_pydevd.DebugInfoHolder.DEBUG_TRACE_LEVEL = 0
|
|
@@ -172,8 +179,9 @@ def test_with_debugger_without_path_mappings(monkeypatch, capsys):
|
|
|
172
179
|
fake_debugpy_wait_for_client = MagicMock()
|
|
173
180
|
monkeypatch.setattr(debugpy, "wait_for_client", fake_debugpy_wait_for_client)
|
|
174
181
|
|
|
175
|
-
# pydevd is dynamically loaded and only available when a real debugger is attached.
|
|
176
|
-
# we fake the whole module, as otherwise the import in start_remote_debugger
|
|
182
|
+
# pydevd is dynamically loaded and only available when a real debugger is attached.
|
|
183
|
+
# So we fake the whole module, as otherwise the import in start_remote_debugger
|
|
184
|
+
# would fail
|
|
177
185
|
fake_pydevd = MagicMock()
|
|
178
186
|
monkeypatch.setitem(sys.modules, "pydevd", fake_pydevd)
|
|
179
187
|
fake_pydevd.DebugInfoHolder.DEBUG_TRACE_LEVEL = 0
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import os
|
|
2
2
|
import sys
|
|
3
3
|
|
|
4
|
-
import briefcase_debugger.debugpy
|
|
5
4
|
import pytest
|
|
5
|
+
|
|
6
|
+
import briefcase_debugger.debugpy
|
|
6
7
|
from briefcase_debugger.config import (
|
|
7
8
|
AppPackagesPathMappings,
|
|
8
9
|
AppPathMappings,
|
|
@@ -61,7 +62,8 @@ def test_mappings_none(monkeypatch):
|
|
|
61
62
|
],
|
|
62
63
|
id="windows",
|
|
63
64
|
),
|
|
64
|
-
# Windows with `app_packages_path_mappings` (currently not used by
|
|
65
|
+
# Windows with `app_packages_path_mappings` (currently not used by
|
|
66
|
+
# briefcase, but principally possible)
|
|
65
67
|
pytest.param(
|
|
66
68
|
"nt",
|
|
67
69
|
AppPathMappings(
|
|
@@ -101,16 +103,37 @@ def test_mappings_none(monkeypatch):
|
|
|
101
103
|
),
|
|
102
104
|
None,
|
|
103
105
|
[
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
106
|
+
(
|
|
107
|
+
"/PROJECT_ROOT/build/helloworld/macos/app/"
|
|
108
|
+
"Hello World.app/Contents/Frameworks/"
|
|
109
|
+
"Python.framework/Versions/3.13/lib/python3.13"
|
|
110
|
+
),
|
|
111
|
+
(
|
|
112
|
+
"/PROJECT_ROOT/build/helloworld/macos/app/"
|
|
113
|
+
"Hello World.app/Contents/Frameworks/"
|
|
114
|
+
"Python.framework/Versions/3.13/lib/python3.13/lib-dynload"
|
|
115
|
+
),
|
|
116
|
+
(
|
|
117
|
+
"/PROJECT_ROOT/build/helloworld/macos/app/"
|
|
118
|
+
"Hello World.app/Contents/Resources/app"
|
|
119
|
+
),
|
|
120
|
+
(
|
|
121
|
+
"/PROJECT_ROOT/build/helloworld/macos/app/"
|
|
122
|
+
"Hello World.app/Contents/Frameworks/"
|
|
123
|
+
"Python.framework/Versions/3.13/lib/python3.13/site-packages"
|
|
124
|
+
),
|
|
125
|
+
(
|
|
126
|
+
"/PROJECT_ROOT/build/helloworld/macos/app/"
|
|
127
|
+
"Hello World.app/Contents/Resources/app_packages"
|
|
128
|
+
),
|
|
109
129
|
],
|
|
110
130
|
[
|
|
111
131
|
(
|
|
112
132
|
"/PROJECT_ROOT/src/helloworld",
|
|
113
|
-
|
|
133
|
+
(
|
|
134
|
+
"/PROJECT_ROOT/build/helloworld/macos/app/"
|
|
135
|
+
"Hello World.app/Contents/Resources/app/helloworld"
|
|
136
|
+
),
|
|
114
137
|
)
|
|
115
138
|
],
|
|
116
139
|
id="macos",
|
|
@@ -128,20 +151,48 @@ def test_mappings_none(monkeypatch):
|
|
|
128
151
|
host_folder="/APP_PACKAGES_PATH/app_packages.iphonesimulator",
|
|
129
152
|
),
|
|
130
153
|
[
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
154
|
+
(
|
|
155
|
+
"CoreSimulator/Devices/RANDOM_NUMBER/data/Containers/"
|
|
156
|
+
"Bundle/Application/RANDOM_NUMBER/"
|
|
157
|
+
"Hello World.app/python/lib/python3.13"
|
|
158
|
+
),
|
|
159
|
+
(
|
|
160
|
+
"CoreSimulator/Devices/RANDOM_NUMBER/data/Containers/"
|
|
161
|
+
"Bundle/Application/RANDOM_NUMBER/"
|
|
162
|
+
"Hello World.app/python/lib/python3.13/lib-dynload"
|
|
163
|
+
),
|
|
164
|
+
(
|
|
165
|
+
"CoreSimulator/Devices/RANDOM_NUMBER/data/Containers/"
|
|
166
|
+
"Bundle/Application/RANDOM_NUMBER/"
|
|
167
|
+
"Hello World.app/app"
|
|
168
|
+
),
|
|
169
|
+
(
|
|
170
|
+
"CoreSimulator/Devices/RANDOM_NUMBER/data/Containers/"
|
|
171
|
+
"Bundle/Application/RANDOM_NUMBER/"
|
|
172
|
+
"Hello World.app/python/lib/python3.13/site-packages"
|
|
173
|
+
),
|
|
174
|
+
(
|
|
175
|
+
"CoreSimulator/Devices/RANDOM_NUMBER/data/Containers/"
|
|
176
|
+
"Bundle/Application/RANDOM_NUMBER/"
|
|
177
|
+
"Hello World.app/app_packages"
|
|
178
|
+
),
|
|
136
179
|
],
|
|
137
180
|
[
|
|
138
181
|
(
|
|
139
182
|
"/PROJECT_ROOT/src/helloworld",
|
|
140
|
-
|
|
183
|
+
(
|
|
184
|
+
"CoreSimulator/Devices/RANDOM_NUMBER/data/Containers/"
|
|
185
|
+
"Bundle/Application/RANDOM_NUMBER/"
|
|
186
|
+
"Hello World.app/app/helloworld"
|
|
187
|
+
),
|
|
141
188
|
),
|
|
142
189
|
(
|
|
143
190
|
"/APP_PACKAGES_PATH/app_packages.iphonesimulator",
|
|
144
|
-
|
|
191
|
+
(
|
|
192
|
+
"CoreSimulator/Devices/RANDOM_NUMBER/data/Containers/"
|
|
193
|
+
"Bundle/Application/RANDOM_NUMBER/"
|
|
194
|
+
"Hello World.app/app_packages"
|
|
195
|
+
),
|
|
145
196
|
),
|
|
146
197
|
],
|
|
147
198
|
id="ios",
|
|
@@ -2,9 +2,10 @@ import json
|
|
|
2
2
|
import os
|
|
3
3
|
from unittest.mock import MagicMock
|
|
4
4
|
|
|
5
|
+
import pytest
|
|
6
|
+
|
|
5
7
|
import briefcase_debugger
|
|
6
8
|
import briefcase_debugger.pdb
|
|
7
|
-
import pytest
|
|
8
9
|
|
|
9
10
|
|
|
10
11
|
def test_no_env_vars(monkeypatch, capsys):
|
|
@@ -30,9 +31,8 @@ def test_no_debugger_verbose(monkeypatch, capsys):
|
|
|
30
31
|
briefcase_debugger.start_remote_debugger()
|
|
31
32
|
|
|
32
33
|
captured = capsys.readouterr()
|
|
33
|
-
assert (
|
|
34
|
-
|
|
35
|
-
== "No 'BRIEFCASE_DEBUGGER' environment variable found. Debugger not starting.\n"
|
|
34
|
+
assert captured.out == (
|
|
35
|
+
"No 'BRIEFCASE_DEBUGGER' environment variable found. Debugger not starting.\n"
|
|
36
36
|
)
|
|
37
37
|
assert captured.err == ""
|
|
38
38
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{briefcase_debugger-0.4.3 → briefcase_debugger-0.4.5}/src/briefcase_debugger.egg-info/SOURCES.txt
RENAMED
|
File without changes
|
|
File without changes
|
{briefcase_debugger-0.4.3 → briefcase_debugger-0.4.5}/src/briefcase_debugger.egg-info/requires.txt
RENAMED
|
File without changes
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"files": [
|
|
3
|
-
"README.md",
|
|
4
3
|
"LICENSE",
|
|
5
|
-
"
|
|
4
|
+
"README.md",
|
|
6
5
|
"pyproject.toml",
|
|
6
|
+
"setup.py",
|
|
7
7
|
"src/briefcase_debugger/__init__.py",
|
|
8
|
-
"src/briefcase_debugger/debugpy.py",
|
|
9
8
|
"src/briefcase_debugger/config.py",
|
|
9
|
+
"src/briefcase_debugger/debugpy.py",
|
|
10
10
|
"src/briefcase_debugger/pdb.py",
|
|
11
|
-
"tests/test_debugpy_path_mappings.py",
|
|
12
11
|
"tests/test_base.py",
|
|
13
12
|
"tests/test_debugpy.py",
|
|
13
|
+
"tests/test_debugpy_path_mappings.py",
|
|
14
14
|
"tests/test_pdb.py"
|
|
15
15
|
]
|
|
16
16
|
}
|
{briefcase_debugger-0.4.3 → briefcase_debugger-0.4.5}/src/briefcase_debugger.egg-info/top_level.txt
RENAMED
|
File without changes
|
|
File without changes
|