Announcing LLDB for VSCode

I was getting the exact same error, please see these tickets in github:
https://github.com/vadimcn/vscode-lldb/issues/5

https://github.com/vadimcn/vscode-lldb/issues/14

I think in my case I had python installed incorrectly maybe? Idk, debugger doesn't work well with my current code due to it not handling threads well, so I'm not sure if my is even working.

I was able to launch lldb successfully using that script, and I've now updated VSCode's settings.json file with the absolute path to that file. Still getting the same error.

Hmm, if you already haven't, can you please follow the rest of troubleshooting steps?

I've done everything up to this line:

Okay, your LLDB seems to be working. Let's see if vscode-lldb log output brings any clues:

  • Add this line to your launch configuration: "debugServer": 4711,

When I add "debugServer": 4711 to my launch.json file, I get this error if I click the "run" button in the debug tab:

connect ECONNREFUSED 127.0.0.1:4711

The "LLDB: Launch Debug Server" command doesn't have any noticeable effect.

I am able to debug my programs using lldb directly, and the python commands in the troubleshooting page work just fine when run in lldb.

Any errors in the Terminal panel?

Yes, there is (I was looking at the wrong terminal before).

lldb -b -O "command script import '/Users/Ted/.vscode/extensions/vadimcn.vscode-lldb-0.4.1/adapter'" -O "script adapter.main.run_tcp_server(ext_channel_port=65170)"
orbide:metrics ehd$ lldb -b -O "command script import '/Users/Ted/.vscode/extensions/vadimcn.vscode-lldb-0.4.1/adapter'" -O "script adapter.main.run_tcp_server(ext_channel_port=65170)"
(lldb) command script import '/Users/Ted/.vscode/extensions/vadimcn.vscode-lldb-0.4.1/adapter'
error: module importing failed: No module named adapter
  File "temp.py", line 1, in <module>

Update: I'm looking in the install directory, and I don't see __init__.py in ./adapter, but I do see that file in the Git repo.

Update 2: Copy/pasting __init__.py from GitHub into the adapter directory seems to have fixed the issue.

Weird... Did you try re-installing the extension?

I hand-added the file to get it working; I'll try reinstalling later.

Update: An uninstall/reinstall cycle fixed the issue. However, now I see the following on the Debug Console panel while debugging:

Traceback (most recent call last):
  File "/Users/Ted/.vscode/extensions/vadimcn.vscode-lldb-0.5.0/adapter/formatters/rust.py", line 149, in get_enum_variant_summary
    elif obj_type.GetFieldAtIndex(1).GetName().startswith('__'): # tuple variant
AttributeError: 'NoneType' object has no attribute 'startswith'

Can you please file a bug with repro? Thanks!