vadimcn / codelldb

A native debugger extension for VSCode based on LLDB
https://marketplace.visualstudio.com/items?itemName=vadimcn.vscode-lldb
MIT License
2.52k stars 245 forks source link

Can't find the correct path to the lldb executable under Windows #961

Closed gezihuzi closed 1 year ago

gezihuzi commented 1 year ago

OS: Windows 11 v22H2-22621.1778 VSCode version: v1.79.2 stable CodeLLDB version: 1.9.2 Compiler: rustc Debugger: lldb.exe(C:\Users*\scoop\apps\llvm\current\bin\lldb.EXE)

The plugin cannot find the correct path to the lldb executable under Windows.

I tried to use lldb to run tauri application on my Windows computer, but I couldn't start lldb properly for debugging, I checked the relevant output of lldb and found the path (Error: ENOENT: no such file or directory, stat 'C:\Applications\Xcode. app\Contents\SharedFrameworks\LLDB.framework\Versions\A\LLDB') is very strange, theoretically this path should be the path of the application under macOS, somehow it will find the executable file of lldb by this path under Windows.

Verbose log
  
Initial debug configuration: {
  type: 'lldb',
  request: 'launch',
  name: 'Tauri Development Debug',
  cargo: {
    args: [
      'build',
      '--manifest-path=./src-tauri/Cargo.toml',
      '--no-default-features'
    ]
  },
  preLaunchTask: 'ui:dev',
  __configurationTarget: 6
}
Raw artifacts:
{
  fileName: 'c:\\Users\\Name\\source\\Project-Tauri\\src-tauri\\target\\debug\\Project-app.exe',
  name: 'Project-app',
  kind: 'bin'
}
Filtered artifacts: 
{
  fileName: 'c:\\Users\\Name\\source\\Project-Tauri\\src-tauri\\target\\debug\\Project-app.exe',
  name: 'Project-app',
  kind: 'bin'
}
Resolved debug configuration: {
  type: 'lldb',
  request: 'launch',
  name: 'Tauri Development Debug',
  preLaunchTask: 'ui:dev',
  __configurationTarget: 6,
  relativePathBase: 'c:\\Users\\Name\\source\\Project-Tauri',
  program: 'c:\\Users\\Name\\source\\Project-Tauri\\src-tauri\\target\\debug\\Project-app.exe',
  sourceLanguages: [ 'rust' ],
  _adapterSettings: {
    displayFormat: 'auto',
    showDisassembly: 'auto',
    dereferencePointers: true,
    suppressMissingSourceFiles: true,
    evaluationTimeout: 5,
    consoleMode: 'commands',
    sourceLanguages: null,
    terminalPromptClear: null,
    evaluateForHovers: true,
    commandCompletions: true,
    reproducer: false
  }
}
Error: ENOENT: no such file or directory, stat 'C:\Applications\Xcode.app\Contents\SharedFrameworks\LLDB.framework\Versions\A\LLDB'

vadimcn commented 1 year ago

Strange indeed.... How did you install the extension? Is this a plain Windows.environment or some emulation like WSL?

gezihuzi commented 1 year ago

Strange indeed.... How did you install the extension? Is this a plain Windows.environment or some emulation like WSL?

Plain Windows, not WSL.

I search for codelldb in VSCode on macOS and install it, then sync the account configuration to Windows.

gezihuzi commented 1 year ago

I think I may have found the problem. The configuration of my account synchronized the plugin's configuration information, and lldb:library was manually (or automatically) set to the above path.

image
gezihuzi commented 1 year ago

After removing the above lldb:library configuration, debugging works fine on both macOS and Windows.

I think I may have found the problem. The configuration of my account synchronized the plugin's configuration information, and lldb:library was manually (or automatically) set to the above path.

image

After removing the above lldb:library configuration, debugging works fine on both macOS and Windows.