Commit 04dcb1b
authored
[lldb-dap] Fix running dap_server.py directly for debugging tests. (#167754)
This adjusts the behavior of running dap_server.py directly to better
support the current state of development. A few parts of the 'main' body
were stale and not functional.
These improvements include:
* Instead of the custom tracefile / replay file parsing logic, I
adjusted the replay helper to handle parsing lldb-dap log files created
with the `LLDBDAP_LOG` env variable, allowing you to more easily run a
failing test like: `python3
lldb/packages/Python/lldbsuite/test/tools/lldb-dap/dap_server.py
--adapter lldb-dap -r
lldb-test-build.noindex/tools/lldb-dap/console/TestDAP_console.test_custom_escape_prefix/dap.txt`
* Migrated argument parsing to `argparse`, that is in all verisons of
py3+ and has a few improvements over `optparse`.
* Corrected the existing arguments and updated `run_vscode` >
`run_adapter`. You can use this for simple debugging like: `xcrun
python3 lldb/packages/Python/lldbsuite/test/tools/lldb-dap/dap_server.py
--adapter=lldb-dap --adapter-arg='--pre-init-command' --adapter-arg
'help' --program a.out --init-command 'help'`1 parent 62e00a0 commit 04dcb1b
File tree
1 file changed
+323
-255
lines changed- lldb/packages/Python/lldbsuite/test/tools/lldb-dap
1 file changed
+323
-255
lines changed
0 commit comments