<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/56691>56691</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            Windows LLVM v14.0.614 DAP adapter lldb-vscode.exe does not process the launch command corrently
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          acotty
      </td>
    </tr>
</table>

<pre>
    On Windows 10 when using the LLVM v14.0.614 DAP adapter lldb-vscode.exe the launch command response indicates that the launch command failed, but using the MSYS2 Mingw64 14.04  lldb-vscode.exe the launch command does not fail. I suspect it has to do with the Windows path used in the launch request, but I could be wrong.

The app is a simple hello world type app consisting of three files for testing breakpoints in multiple files.

The application used is a version of Code::Blocks where I have been working to add a DAP plugin. The C::B build log is:
~~~
g++.exe -std=c++17 -Og -gdwarf-4 -I.\ -IC:\msys64\mingw64\include -c D:\Andrew_Development\Z_Testing_Apps\Clang_Multi_File_Test\main.cpp -o obj\main.o
g++.exe -std=c++17 -Og -gdwarf-4 -I.\ -IC:\msys64\mingw64\include -c D:\Andrew_Development\Z_Testing_Apps\Clang_Multi_File_Test\second.cpp -o obj\second.o
g++.exe -std=c++17 -Og -gdwarf-4 -I.\ -IC:\msys64\mingw64\include -c D:\Andrew_Development\Z_Testing_Apps\Clang_Multi_File_Test\Sub_3\second.cpp -o obj\Sub_3\second.o
g++.exe -std=c++17 -Og -gdwarf-4 -I.\ -IC:\msys64\mingw64\include -c D:\Andrew_Development\Z_Testing_Apps\Clang_Multi_File_Test\Sub_4\second.cpp -o obj\Sub_4\second.o
g++.exe -LC:\msys64\mingw64\lib -o bin\clang_Printf.exe obj\main.o obj\second.o obj\Sub_3\second.o obj\Sub_4\second.o   
~~~

The batch file I use to start the LLVM  lldb-vscode.exe for testing is:
~~~
echo on
set PYTHONHOME=C:\Users\andrew\AppData\Local\Programs\Python\Python310\
E:\Downloads\GCC_Compilers\LLVM\LLVM-14.0.6-win64\bin\lldb-vscode.exe --port 12345
~~~

The Code::Blocks DAP plugin log file snippet for the launch command is:
~~~
[debug   ] <                    Debugger_DAP::OnDapLog(L  3234)> 
--> 
    {
        "seq": 5,
        "type": "request",
        "command": "launch",
        "arguments": {
            "noDebug": false,
            "program": "D:\\Andrew_Development\\Z_Testing_Apps\\Clang_Multi_File_Test\\bin\\clang_Printf.exe",
            "args": [],
            "cwd": "",
            "env": {}
        }
    }
[debug] < Debugger_DAP::OnDapLog(L 3234) >
<-- 
{
    "command": "launch",
    "message": "unknown error",
    "request_seq": 5,
    "seq": 0,
    "success": false,
    "type": "response"
}
~~~

The Code::Blocks DAP plugin full log file is:
~~~
Active debugger config: DAP:LLVM
           <                       Debugger_DAP::Debug(L   329)> starting debugger
Building to ensure sources are up-to-date
           <              Debugger_DAP::SelectCompiler(L   394)> Selecting target: Debug
Adding file: D:\Andrew_Development\Z_Testing_Apps\Clang_Multi_File_Test\bin\clang_Printf.exe
[debug   ] <               Debugger_DAP::StartDebugger(L   597)> wxSetEnv(PATH , .;C:\msys64\mingw64\bin;C:\msys64\mingw64;.;D:\Andrew_Development\Libraries\wxWidgets-3.2.0_win64\lib\gcc_dll;D:\Andrew_Development\Work_Installers\CodeBLocks_Private_Experimental_GCC\src\devel32_64;D:\Andrew_Development\Work_Installers\CodeBLocks_Private_Experimental_GCC\src\exchndl\Win_10\win64\lib;C:\Windows\System32;C:\Windows;C:\Windows\System32\wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Windows\System32\OpenSSH;C:\Bin;C:\Program Files\dotnet;C:\Program Files\nodejs;C:\Program Files\TortoiseGit\bin;C:\Program Files\TortoiseSVN\bin;C:\Program Files\PowerShell\7-preview\preview;C:\Program Files\PowerShell\7;C:\Program Files\Git\cmd;C:\Users\andrew\AppData\Local\Programs\Python\Python310\Scripts;C:\Users\andrew\AppData\Local\Programs\Python\Python310;C:\Users\andrew\AppData\Local\Programs\git-cola\bin;C:\Users\andrew\AppData\Local\Microsoft\WindowsApps;C:\Users\andrew\AppData\Local\Programs\Microsoft VS Code Insiders\bin;C:\Users\andrew\AppData\Local\GitHubDesktop\bin;C:\Users\andrew\AppData\Local\gitkraken\bin;C:\Users\andrew\.dotnet\tools;C:\Users\andrew\AppData\Roaming\npm
           <              Debugger_DAP::LaunchDebugger(L   651)> dap_debugger: E:\Downloads\GCC_Compilers\LLVM\LLVM-14.0.6-win64\bin\lldb-vscode.exe
           <              Debugger_DAP::LaunchDebugger(L   660)> dap_port_number: 12345
           <              Debugger_DAP::LaunchDebugger(L   665)> DEBUGGEE: D:\Andrew_Development\Z_Testing_Apps\Clang_Multi_File_Test\bin\clang_Printf.exe
           <           Debugger_DAP::LaunchDAPDebugger(L   624)> dapStartCmd: E:\Downloads\GCC_Compilers\LLVM\LLVM-14.0.6-win64\bin\lldb-vscode.exe -port 12345
           <           Debugger_DAP::LaunchDAPDebugger(L   630)> finished dapStartCmd: E:\Downloads\GCC_Compilers\LLVM\LLVM-14.0.6-win64\bin\lldb-vscode.exe -port 12345 , m_dapPid: 7820
[debug   ] <              Debugger_DAP::LaunchDebugger(L   707)> m_dap_debuggeepath: D:\Andrew_Development\Z_Testing_Apps\Clang_Multi_File_Test\bin
[debug   ] <                    Debugger_DAP::OnDapLog(L  3234)> --> {"seq":1,"type":"request","command":"initialize","arguments":{"clientID":"CB_DAP_Plugin","clientName":"CB_DAP_Plugin","adapterID":"","locale":"en-US","linesStartAt1":true,"columnsStartAt1":false,"pathFormat":"path","supportsInvalidatedEvent":false}}
[debug   ] <                    Debugger_DAP::OnDapLog(L  3234)> <-- {"body":{"exceptionBreakpointFilters":[{"default":false,"filter":"cpp_catch","label":"C++ Catch"},{"default":false,"filter":"cpp_throw","label":"C++ Throw"},{"default":false,"filter":"objc_catch","label":"Objective C Catch"},{"default":false,"filter":"objc_throw","label":"Objective C Throw"},{"default":false,"filter":"swift_catch","label":"Swift Catch"},{"default":false,"filter":"swift_throw","label":"Swift Throw"}],"supportTerminateDebuggee":true,"supportsCompletionsRequest":false,"supportsConditionalBreakpoints":true,"supportsConfigurationDoneRequest":true,"supportsDelayedStackTraceLoading":true,"supportsEvaluateForHovers":true,"supportsExceptionInfoRequest":true,"supportsExceptionOptions":true,"supportsFunctionBreakpoints":true,"supportsGotoTargetsRequest":false,"supportsHitConditionalBreakpoints":true,"supportsLoadedSourcesRequest":false,"supportsModulesRequest":true,"supportsProgressReporting":true,"supportsRestartFrame":false,"supportsRestartRequest":false,"supportsRunInTerminalRequest":true,"supportsSetVariable":true,"supportsStepBack":false,"supportsStepInTargetsRequest":false,"supportsValueFormattingOptions":true},"command":"initialize","request_seq":1,"seq":0,"success":true,"type":"response"}
           <        Debugger_DAP::OnInitializeResponse(L  2862)> Received event
           <        Debugger_DAP::OnInitializeResponse(L  2869)> Got OnInitialize Response
           <        Debugger_DAP::OnInitializeResponse(L  2896)> m_eSentConfigurationDone == eSentConfiguratonDone::NotSent
[debug   ] <          Debugger_DAP::CreateStartWatches(L  1405)> No watches
           <        Debugger_DAP::OnInitializeResponse(L  2907)> Placing breakpoint at main...
[debug   ] <                    Debugger_DAP::OnDapLog(L  3234)> --> {"seq":2,"type":"request","command":"setFunctionBreakpoints","arguments":{"breakpoints":[{"name":"main","condition":""}]}}
[debug   ] <                    Debugger_DAP::OnDapLog(L  3234)> --> {"seq":3,"type":"request","command":"configurationDone"}
[debug   ] <                    Debugger_DAP::OnDapLog(L  3234)> <-- {"body":{"breakpoints":[{}]},"command":"setFunctionBreakpoints","request_seq":2,"seq":0,"success":true,"type":"response"}
           <     Debugger_DAP::OnBreakpointFunctionSet(L  3216)> Received response
           <     Debugger_DAP::OnBreakpointFunctionSet(L  3223)> Got OnBreakpointFunctionSet event
[debug   ] <                    Debugger_DAP::OnDapLog(L  3234)> <-- {"command":"configurationDone","request_seq":3,"seq":0,"success":true,"type":"response"}
           < Debugger_DAP::OnConfigurationDoneResponse(L  2930)> Received response
           < Debugger_DAP::OnConfigurationDoneResponse(L  2936)> Got OnConfigurationDoneResponse Response
[debug   ] <                    Debugger_DAP::OnDapLog(L  3234)> --> {"seq":5,"type":"request","command":"launch","arguments":{"noDebug":false,"program":"D:\\Andrew_Development\\Z_Testing_Apps\\Clang_Multi_File_Test\\bin\\clang_Printf.exe","args":[],"cwd":"","env":{}}}
[debug   ] <                    Debugger_DAP::OnDapLog(L  3234)> <-- {"command":"launch","message":"unknown error","request_seq":5,"seq":0,"success":false,"type":"response"}
           <            Debugger_DAP::OnLaunchResponse(L  2794)> Received response
* ERROR  * <            Debugger_DAP::OnLaunchResponse(L  2807)> Bad Response: unknown error
[debug   ] <                    Debugger_DAP::OnDapLog(L  3234)> <-- {"body":{"isLocalProcess":true,"name":"D:\\Andrew_Development\\Z_Testing_Apps\\Clang_Multi_File_Test\\bin\\clang_Printf.exe","startMethod":"launch","systemProcessId":0},"event":"process","seq":0,"type":"event"}
[debug   ] <                    Debugger_DAP::OnDapLog(L  3234)> <-- {"event":"initialized","seq":0,"type":"event"}
           <          Debugger_DAP::OnInitializedEvent(L  2821)> Received event
           <          Debugger_DAP::OnInitializedEvent(L  2845)> m_eSentConfigurationDone != eSentConfiguratonDone::NotSent

~~~

The following is the snippet from the same app and C::B version using the MSYS2 Mingw64 14.04  lldb-vscode.exe  dap adapter, which works fine.:

~~~
[debug   ] <                    Debugger_DAP::OnDapLog(L  3234)> --> {"seq":5,"type":"request","command":"launch","arguments":{"noDebug":false,"program":"D:\\Andrew_Development\\Z_Testing_Apps\\Clang_Multi_File_Test\\bin\\clang_Printf.exe","args":[],"cwd":"","env":{}}}
[debug   ] <                    Debugger_DAP::OnDapLog(L  3234)> <-- {"command":"launch","request_seq":5,"seq":0,"success":true,"type":"response"}
~~~
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJztG9tu4rr2a-iLBYKES_vAA7dOK7XTqnRmtM8LcmIDnpo423Zgur_-LDtXIAHKtN2ao1MhSOKVdfe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