Vscode-cpptools: Can't get VS to work with LLDB on linux

Created on 9 Sep 2016  Â·  3Comments  Â·  Source: microsoft/vscode-cpptools

Tried with lldb 3.7, 3.8 and 3.9
When debugging is started,

"Unable to start debugging. Unable to establish a connection to LLDB. Debug output may contain more information." is shown

The console simply show the usage help:

Usage:

  lldb -h
  lldb -v [[--] <PROGRAM-ARG-1> [<PROGRAM_ARG-2> ...]]
  lldb -a <arch> -f <filename> [-c <filename>] [-s <filename>] [-o <none>] [-S <filename>] [-O <none>] [-k <none>] [-K <filename>] [-Q] [-b] [-e] [-x] [-X] [-l <script-language>] [-d] [[--] <PROGRAM-ARG-1> [<PROGRAM_ARG-2> ...]]
  lldb -n <process-name> -w [-s <filename>] [-o <none>] [-S <filename>] [-O <none>] [-k <none>] [-K <filename>] [-Q] [-b] [-e] [-x] [-X] [-l <script-language>] [-d]
  lldb -p <pid> [-s <filename>] [-o <none>] [-S <filename>] [-O <none>] [-k <none>] [-K <filename>] [-Q] [-b] [-e] [-x] [-X] [-l <script-language>] [-d]
  lldb -P

       -h 
       --help 
            Prints out the usage information for the LLDB debugger.

       -v 
       --version 
            Prints out the current version number of the LLDB debugger.

       -a <arch>
       --arch <arch>
            Tells the debugger to use the specified architecture when starting
            and running the program.  <architecture> must be one of the
            architectures for which the program was compiled.

       -f <filename>
       --file <filename>
            Tells the debugger to use the file <filename> as the program to be
            debugged.

       -c <filename>
       --core <filename>
            Tells the debugger to use the fullpath to <path> as the core file.

       -p <pid>
       --attach-pid <pid>
            Tells the debugger to attach to a process with the given pid.

       -n <process-name>
       --attach-name <process-name>
            Tells the debugger to attach to a process with the given name.

       -w 
       --wait-for 
            Tells the debugger to wait for a process with the given pid or name
            to launch before attaching.

       -s <filename>
       --source <filename>
            Tells the debugger to read in and execute the lldb commands in the
            given file, after any file provided on the command line has been
            loaded.

       -o 
       --one-line 
            Tells the debugger to execute this one-line lldb command after any
            file provided on the command line has been loaded.

       -S <filename>
       --source-before-file <filename>
            Tells the debugger to read in and execute the lldb commands in the
            given file, before any file provided on the command line has been
            loaded.

       -O 
       --one-line-before-file 
            Tells the debugger to execute this one-line lldb command before any
            file provided on the command line has been loaded.

       -k 
       --one-line-on-crash 
            When in batch mode, tells the debugger to execute this one-line
            lldb command if the target crashes.

       -K <filename>
       --source-on-crash <filename>
            When in batch mode, tells the debugger to source this file of lldb
            commands if the target crashes.

       -Q 
       --source-quietly 
            Tells the debugger to execute this one-line lldb command before any
            file provided on the command line has been loaded.

       -b 
       --batch 
            Tells the debugger to running the commands from -s, -S, -o & -O,
            and then quit.  However if any run command stopped due to a signal
            or crash, the debugger will return to the interactive prompt at the
            place of the crash.

       -e 
       --editor 
            Tells the debugger to open source files using the host's "external
            editor" mechanism.

       -x 
       --no-lldbinit 
            Do not automatically parse any '.lldbinit' files.

       -X 
       --no-use-colors 
            Do not use colors.

       -P 
       --python-path 
            Prints out the path to the lldb.py file for this version of lldb.

       -l <script-language>
       --script-language <script-language>
            Tells the debugger to use the specified scripting language for
            user-defined scripts, rather than the default.  Valid scripting
            languages that can be specified include Python, Perl, Ruby and Tcl.
            Currently only the Python extensions have been implemented.

       -d 
       --debug 
            Tells the debugger to print out extra information for debugging
            itself.


  Notes:

       Multiple "-s" and "-o" options can be provided.  They will be processed from left to right in order, 
       with the source files and commands interleaved.  The same is true of the "-S" and "-O" options.
       The before file and after file sets can intermixed freely, the command parser will sort them out.
       The order of the file specifiers ("-c", "-f", etc.) is not significant in this regard.


All 3 comments

1) When we debug with lldb, we have to use lldb-mi which is the mi front end. It appears you pointed it to lldb proper instead.

2) That said… Lldb-mi has a number of bugs we had to fix in order to it working on mac. We’re working to push these into the mainline lldb, but this hasn’t happened yet. Unfortunately, that means that lldb will not work on linux until that happens.

From: Jean-Yves Avenard [mailto:[email protected]]
Sent: Thursday, September 8, 2016 5:39 PM
To: Microsoft/vscode-cpptools [email protected]
Subject: [Microsoft/vscode-cpptools] Can't get VS to work with LLDB on linux (#215)

Tried with lldb 3.7, 3.8 and 3.9
When debugging is started,

"Unable to start debugging. Unable to establish a connection to LLDB. Debug output may contain more information." is shown

The console simply show the usage help:

Usage:

lldb -h

lldb -v [[--] [ ...]]

lldb -a -f [-c ] [-s ] [-o ] [-S ] [-O ] [-k ] [-K ] [-Q] [-b] [-e] [-x] [-X] [-l ] [-d] [[--] [ ...]]

lldb -n -w [-s ] [-o ] [-S ] [-O ] [-k ] [-K ] [-Q] [-b] [-e] [-x] [-X] [-l ] [-d]

lldb -p [-s ] [-o ] [-S ] [-O ] [-k ] [-K ] [-Q] [-b] [-e] [-x] [-X] [-l ] [-d]

lldb -P

   --help

        Prints out the usage information for the LLDB debugger.



   -v

   --version

        Prints out the current version number of the LLDB debugger.



   -a <arch>

   --arch <arch>

        Tells the debugger to use the specified architecture when starting

        and running the program.  <architecture> must be one of the

        architectures for which the program was compiled.



   -f <filename>

   --file <filename>

        Tells the debugger to use the file <filename> as the program to be

        debugged.



   -c <filename>

   --core <filename>

        Tells the debugger to use the fullpath to <path> as the core file.



   -p <pid>

   --attach-pid <pid>

        Tells the debugger to attach to a process with the given pid.



   -n <process-name>

   --attach-name <process-name>

        Tells the debugger to attach to a process with the given name.



   -w

   --wait-for

        Tells the debugger to wait for a process with the given pid or name

        to launch before attaching.



   -s <filename>

   --source <filename>

        Tells the debugger to read in and execute the lldb commands in the

        given file, after any file provided on the command line has been

        loaded.



   -o

   --one-line

        Tells the debugger to execute this one-line lldb command after any

        file provided on the command line has been loaded.



   -S <filename>

   --source-before-file <filename>

        Tells the debugger to read in and execute the lldb commands in the

        given file, before any file provided on the command line has been

        loaded.



   -O

   --one-line-before-file

        Tells the debugger to execute this one-line lldb command before any

        file provided on the command line has been loaded.



   -k

   --one-line-on-crash

        When in batch mode, tells the debugger to execute this one-line

        lldb command if the target crashes.



   -K <filename>

   --source-on-crash <filename>

        When in batch mode, tells the debugger to source this file of lldb

        commands if the target crashes.



   -Q

   --source-quietly

        Tells the debugger to execute this one-line lldb command before any

        file provided on the command line has been loaded.



   -b

   --batch

        Tells the debugger to running the commands from -s, -S, -o & -O,

        and then quit.  However if any run command stopped due to a signal

        or crash, the debugger will return to the interactive prompt at the

        place of the crash.



   -e

   --editor

        Tells the debugger to open source files using the host's "external

        editor" mechanism.



   -x

   --no-lldbinit

        Do not automatically parse any '.lldbinit' files.



   -X

   --no-use-colors

        Do not use colors.



   -P

   --python-path

        Prints out the path to the lldb.py file for this version of lldb.



   -l <script-language>

   --script-language <script-language>

        Tells the debugger to use the specified scripting language for

        user-defined scripts, rather than the default.  Valid scripting

        languages that can be specified include Python, Perl, Ruby and Tcl.

        Currently only the Python extensions have been implemented.



   -d

   --debug

        Tells the debugger to print out extra information for debugging

        itself.

Notes:

   Multiple "-s" and "-o" options can be provided.  They will be processed from left to right in order,

   with the source files and commands interleaved.  The same is true of the "-S" and "-O" options.

   The before file and after file sets can intermixed freely, the command parser will sort them out.

   The order of the file specifiers ("-c", "-f", etc.) is not significant in this regard.

—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHubhttps://github.com/Microsoft/vscode-cpptools/issues/215, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AM3W_ZymnF8CnEUHeNPaOVHM4gLDPh4Fks5qoKqVgaJpZM4J4lzF.

that was super quick answer.. thank you...

having same issue on windows ... what to do ? I even tried lldb-mi which failes with
Starting: "D:/clang/LLVM/bin/lldb-mi.exe" --interpreter=mi
MI: Error: Driver. LLDB Debugger.
MI: Error: Driver Manager. Driver 'Machine Interface Driver Version: 1.0.0.9' (ID:'MIDriver') initialise failed. Driver. LLDB Debugger.
"D:/clang/LLVM/bin/lldb-mi.exe" exited with code -1000 (0xFFFFFC18).
what to do ?

Was this page helpful?
0 / 5 - 0 ratings