This is an archive of the discontinued LLVM Phabricator instance.

Fix lldb-vscode logging and enable logging for all lldb-vscode tests.
ClosedPublic

Authored by clayborg on Feb 13 2020, 8:52 AM.

Details

Summary

This patch fixes logging to log incoming packets which was removed during a refactor.

We also enable logging to a "vscode.txt" file for each lldb-vscode test by creating the log file in the build artifacts directory for each test. This allows users to see the packets for their tests if needed and the log file is in a directory that will be removed after tests have been run.

Diff Detail

Event Timeline

clayborg created this revision.Feb 13 2020, 8:52 AM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 13 2020, 8:52 AM

Here is an example of where these files end up after running tests:

$ cd lldb-test-build.noindex/
$ find . -name vscode.txt
./tools/lldb-vscode/breakpoint-events/TestVSCode_breakpointEvents.test_breakpoint_events/vscode.txt
./tools/lldb-vscode/launch/TestVSCode_launch.test_shellExpandArguments_enabled/vscode.txt
./tools/lldb-vscode/launch/TestVSCode_launch.test_shellExpandArguments_disabled/vscode.txt
./tools/lldb-vscode/launch/TestVSCode_launch.test_stopOnEntry/vscode.txt
./tools/lldb-vscode/launch/TestVSCode_launch.test_commands/vscode.txt
./tools/lldb-vscode/launch/TestVSCode_launch.test_cwd/vscode.txt
./tools/lldb-vscode/launch/TestVSCode_launch.test_args/vscode.txt
./tools/lldb-vscode/launch/TestVSCode_launch.test_disableSTDIO/vscode.txt
./tools/lldb-vscode/launch/TestVSCode_launch.test_debuggerRoot/vscode.txt
./tools/lldb-vscode/launch/TestVSCode_launch.test_environment/vscode.txt
./tools/lldb-vscode/launch/TestVSCode_launch.test_extra_launch_commands/vscode.txt
./tools/lldb-vscode/launch/TestVSCode_launch.test_sourcePath/vscode.txt
./tools/lldb-vscode/step/TestVSCode_step.test_step/vscode.txt
./tools/lldb-vscode/breakpoint/TestVSCode_setExceptionBreakpoints.test_functionality/vscode.txt
./tools/lldb-vscode/breakpoint/TestVSCode_setFunctionBreakpoints.test_functionality/vscode.txt
./tools/lldb-vscode/breakpoint/TestVSCode_setBreakpoints.test_set_and_clear/vscode.txt
./tools/lldb-vscode/breakpoint/TestVSCode_setBreakpoints.test_functionality/vscode.txt
./tools/lldb-vscode/breakpoint/TestVSCode_setFunctionBreakpoints.test_set_and_clear/vscode.txt
./tools/lldb-vscode/attach/TestVSCode_attach.test_by_pid/vscode.txt
./tools/lldb-vscode/attach/TestVSCode_attach.test_by_name/vscode.txt
./tools/lldb-vscode/variables/TestVSCode_variables.test_scopes_variables_setVariable_evaluate/vscode.txt
./tools/lldb-vscode/stackTrace/TestVSCode_stackTrace.test_stackTrace/vscode.txt
wallace accepted this revision.Feb 13 2020, 9:50 AM

Cool

This revision is now accepted and ready to land.Feb 13 2020, 9:50 AM
This revision was automatically updated to reflect the committed changes.
jankratochvil marked an inline comment as done.Feb 13 2020, 10:07 AM
jankratochvil added inline comments.
lldb/tools/lldb-vscode/VSCode.cpp
136

I had this chunk in a local patch, thanks.