-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hangs at Target folder not found. Cargo is installing necessary tools. #5
Comments
Hey Woody4618, so I troubleshooted the issue on my end, I could only reproduce it if I didn't have vscode opened in the Solana project itself.
Can you provide more information as: From where did you run the command? |
Ill update readme for the project directory launch, also for the agave-ledger-tool command as it seems that its outdated. |
I have lldb installed via brew: lldb version 19.1.7 Looks like the path from the readme was wrong:
Like that it takes the lldb installation from the solana install. Now it runs, but setting breakpoints does not work: solana-lldb
target create /Users/jonasmac2/Documents/GitHub/solana-step-debugger/example-project/solana_test_extension/target/debug/deps/solana_test_extension-ec23fc6e8d21b5ad
process launch -- --nocapture
(lldb) command script import "/Users/jonasmac2/.local/share/solana/install/active_release/bin/sdk/sbf/dependencies/platform-tools/llvm/bin/lldb_lookup.py"
(lldb) command script import "/Users/jonasmac2/.local/share/solana/install/active_release/bin/sdk/sbf/dependencies/platform-tools/llvm/bin/solana_lookup.py"
(lldb) command source -s 0 '/Users/jonasmac2/.local/share/solana/install/active_release/bin/sdk/sbf/dependencies/platform-tools/llvm/bin/lldb_commands'
Executing commands in '/Users/jonasmac2/.local/share/solana/install/active_release/bin/sdk/sbf/dependencies/platform-tools/llvm/bin/lldb_commands'.
(lldb) type synthetic add -l lldb_lookup.synthetic_lookup -x ".*" --category Rust
(lldb) type summary add -F lldb_lookup.summary_lookup -e -x -h "^(alloc::([a-z_]+::)+)String$" --category Rust
(lldb) type summary add -F lldb_lookup.summary_lookup -e -x -h "^&(mut )?str$" --category Rust
(lldb) type summary add -F lldb_lookup.summary_lookup -e -x -h "^&(mut )?\\[.+\\]$" --category Rust
(lldb) type summary add -F lldb_lookup.summary_lookup -e -x -h "^(std::ffi::([a-z_]+::)+)OsString$" --category Rust
(lldb) type summary add -F lldb_lookup.summary_lookup -e -x -h "^(alloc::([a-z_]+::)+)Vec<.+>$" --category Rust
(lldb) type summary add -F lldb_lookup.summary_lookup -e -x -h "^(alloc::([a-z_]+::)+)VecDeque<.+>$" --category Rust
(lldb) type summary add -F lldb_lookup.summary_lookup -e -x -h "^(alloc::([a-z_]+::)+)BTreeSet<.+>$" --category Rust
(lldb) type summary add -F lldb_lookup.summary_lookup -e -x -h "^(alloc::([a-z_]+::)+)BTreeMap<.+>$" --category Rust
(lldb) type summary add -F lldb_lookup.summary_lookup -e -x -h "^(std::collections::([a-z_]+::)+)HashMap<.+>$" --category Rust
(lldb) type summary add -F lldb_lookup.summary_lookup -e -x -h "^(std::collections::([a-z_]+::)+)HashSet<.+>$" --category Rust
(lldb) type summary add -F lldb_lookup.summary_lookup -e -x -h "^(alloc::([a-z_]+::)+)Rc<.+>$" --category Rust
(lldb) type summary add -F lldb_lookup.summary_lookup -e -x -h "^(alloc::([a-z_]+::)+)Arc<.+>$" --category Rust
(lldb) type summary add -F lldb_lookup.summary_lookup -e -x -h "^(core::([a-z_]+::)+)Cell<.+>$" --category Rust
(lldb) type summary add -F lldb_lookup.summary_lookup -e -x -h "^(core::([a-z_]+::)+)Ref<.+>$" --category Rust
(lldb) type summary add -F lldb_lookup.summary_lookup -e -x -h "^(core::([a-z_]+::)+)RefMut<.+>$" --category Rust
(lldb) type summary add -F lldb_lookup.summary_lookup -e -x -h "^(core::([a-z_]+::)+)RefCell<.+>$" --category Rust
(lldb) type category enable Rust
(lldb) command source -s 0 '/Users/jonasmac2/.local/share/solana/install/active_release/bin/sdk/sbf/dependencies/platform-tools/llvm/bin/solana_commands'
Executing commands in '/Users/jonasmac2/.local/share/solana/install/active_release/bin/sdk/sbf/dependencies/platform-tools/llvm/bin/solana_commands'.
(lldb) type summary add -F solana_lookup.summary_lookup solana_program::account_info::AccountInfo --category Solana
(lldb) type summary add -F solana_lookup.summary_lookup solana_program::pubkey::Pubkey --category Solana
(lldb) type category enable Solana
(lldb) target create /Users/jonasmac2/Documents/GitHub/solana-step-debugger/example-project/solana_test_extension/target/debug/deps/solana_test_extension-ec23fc6e8d21b5ad
Current executable set to '/Users/jonasmac2/Documents/GitHub/solana-step-debugger/example-project/solana_test_extension/target/debug/deps/solana_test_extension-ec23fc6e8d21b5ad' (arm64).
(lldb) process launch -- --nocapture
Process 84299 launched: '/Users/jonasmac2/Documents/GitHub/solana-step-debugger/example-project/solana_test_extension/target/debug/deps/solana_test_extension-ec23fc6e8d21b5ad' (arm64)
running 1 test
stop: 1
lorem ipsum
Hello, Solana!
test tests::test_process_instruction ... ok
test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
Process 84299 exited with status = 0 (0x00000000)
(lldb) breakpoint set --file /Users/jonasmac2/Documents/GitHub/solana-step-debugger/example-project/solana_test_extension/src/lib.rs --line 15
error: solana_test_extension-ec23fc6e8d21b5ad unable to resolve a line table file address 0x0000000100002d44 back to a compile unit, please file a bug and attach the address and file.
error: solana_test_extension-ec23fc6e8d21b5ad unable to resolve a line table file address 0x0000000100003188 back to a compile unit, please file a bug and attach the address and file.
error: solana_test_extension-ec23fc6e8d21b5ad unable to resolve a line table file address 0x000000010000319c back to a compile unit, please file a bug and attach the address and file.
error: solana_test_extension-ec23fc6e8d21b5ad unable to resolve a line table file address 0x00000001000031a4 back to a compile unit, please file a bug and attach the address and file.
error: solana_test_extension-ec23fc6e8d21b5ad unable to resolve a line table file address 0x00000001000031c4 back to a compile unit, please file a bug and attach the address and file.
error: solana_test_extension-ec23fc6e8d21b5ad unable to resolve a line table file address 0x0000000100003274 back to a compile unit, please file a bug and attach the address and file.
Breakpoint 1: where = solana_test_extension-ec23fc6e8d21b5ad`solana_test_extension::process_instruction::hfbffa84d1f43d3a2 + 272, address = 0x0000000100002d44
(lldb) |
So I've checked the paths and there are 2 ways that it could be accessed depending on lldb installation so I'll add those to the readme as well. For the breakpoints. In the readme, it says that after you've launched the file and run it then you can add breakpoints and rerun the file with the command "Re-run process launch" As I see from the log provided you've added the breakpoint but didn't rerun the file. Try that and let me know if anything else pops up. |
When add a breakpoint without running LLDB before i get jonasmac2@MacBook-Pro-32 solana_test_extension % breakpoint delete 1 Where does that command come from? |
zsh doesn't recognize that command because it's an lldb command and it's executed when you've opened the "Solana Debugger" terminal from the command Run Solana LLDB, the lldb is launched and you set a breakpoint in vs code when you delete a breakpoint you get the command "breakpoint delete {the breakpoint in order that was deleted}" if you close that terminal those commands won't run. And you need to run the program again and do the flow. You won't get those commands in another terminal. only in the Newly opened one by the extension. I cannot add more debug info to those kind of error messages. |
Ah i see i missed the Rerun part. It wasnt obvious to me. Thank you for explaining. Now if i run it, set a breakpoint and rerun it stops at the breakpoint and i see the assembly code: Process 38983 launched: '/Users/jonasmac2/Documents/GitHub/solana-step-debugger/example-project/solana_test_extension/target/debug/deps/solana_test_extension-ec23fc6e8d21b5ad' (arm64) running 1 test
Cool stuff. I can step through different breakpoints using c. Is there a way to inspect variables? Can you add a section on how to use the debugger? |
I'll add a link to more lldb commands LLDB Commands in the readme, for the inspect variables I'm not 100% sure, but probably no, for that !msg() should be used. |
Hey, i cant get it to work.
I installed everything including
etc
But when running Run Solana LLDB it just hangs here without any error message:
Can you somehow figure out what is missing and show an error message?
Im on a mac using VsCode:
solana-cli 2.0.17 (src:93e6e33e; feat:607245837, client:Agave)
libprotoc 29.3
llvm 19.1.7
agave-ledger-tool 2.0.17 (src:93e6e33e; feat:607245837, client:Agave)
The text was updated successfully, but these errors were encountered: