codelldb icon indicating copy to clipboard operation
codelldb copied to clipboard

Process Launch Failed

Open xaviex opened this issue 9 years ago • 7 comments

Which OS:Windows Which LLDB version (lldb -version): lldb version 6.0.0 Which VSCode version (Help/About): 1.17.2

What is the problem and how did you get there: I god LLDB set up with python support and ECT. It is passing the self check also. But when I set up launch.json as so

{
    // Use IntelliSense to learn about possible attributes.
    // Hover to view descriptions of existing attributes.
    // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
    "version": "0.2.0",
    "configurations": [
    
        {
            "type": "lldb",
            "request": "launch",
            "sourceLanguages": [
                "rust"
            ],
            "name": "Debug",
            
            "program": "${workspaceFolder}/target/debug/hello_world.exe",
            "args": []
    
        }
    ]
}

But when I attempt to run I get the error


process launch failed: unknown error
Error: Process launch failed.

xaviex avatar Nov 01 '17 20:11 xaviex

Can you launch it in lldb CLI?

vadimcn avatar Nov 02 '17 06:11 vadimcn

@vadimcn I fixed this problem, now I am unable to find any breakpoints in the .exe after compiling with cargo, ive made sure debuginfo is set to 2 on its call of rustc, I am getting Source Location Unknown

xaviex avatar Nov 02 '17 14:11 xaviex

Are you using -gnu or -msvc toolchain? PDB support in LLDB is not so good...

vadimcn avatar Nov 03 '17 16:11 vadimcn

msvc, how can i switch?

On Fri, Nov 3, 2017 at 12:01 PM Vadim Chugunov [email protected] wrote:

Are you using -gnu or -msvc toolchain? PDB support in LLDB is not so good...

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/vadimcn/vscode-lldb/issues/72#issuecomment-341747260, or mute the thread https://github.com/notifications/unsubscribe-auth/ABVYXlcuYtHOt7Tn-IHI85jXzyrnxu_Qks5syzjhgaJpZM4QOw0e .

xaviex avatar Nov 03 '17 18:11 xaviex

I've been having all sorts of issues doing this too (also windows 10, trying with the 32-bit toolchain), from this:

(lldb) command script import 'C:\Users\meeso.vscode\extensions\vadimcn.vscode-lldb-0.7.1\adapter' (lldb) script adapter.main.run_tcp_session(0, 'e30=') Listening on port 46996 Adapter exit code: 3221225477.

to this:

process launch failed: unknown error Error: Process launch failed.

Also using msvc toolchain, and added python35 to path here (/src/llvm/bin/python35), along with this in both main.py and init.py:

import os os.chdir( "/src/LLVM/bin/python35" )

Also tried this, but it didn't help either (couldn't figure out how to get vscode to compile either), so did this manually:

rustc -C debuginfo=2 tryout.rs

alexpmorris avatar Nov 03 '17 18:11 alexpmorris

msvc, how can i switch?

rustup toolchain install stable-i686-pc-windows-gnu rustup default stable-i686-pc-windows-gnu (or override per-directory)

Also using msvc toolchain, and added python35 to path here (/src/llvm/bin/python35), along with this in both main.py and init.py:

There's an easier way: you can alter environment passed down to LLDB via user/workspace settings. Since you are on Windows, you should use Windows path format in PATH, e.g. "lldb.environment": {"PATH" : "${env:PATH};C:\\Python35_install_path"} (delimit with semicolon!)

vadimcn avatar Nov 03 '17 21:11 vadimcn

Thanks so much, that did it! :D So I guess you really do just have to use the GNU toolchain for it to properly work. This time I got it up and running first try!

I had also tried to set lldb.environment, but I was slightly off, since I had left out the ${env:PATH}; part, so thank you for that as well!

alexpmorris avatar Nov 04 '17 00:11 alexpmorris