question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Windows Debug hello World -> Unable to launch Rust Project from selection

See original GitHub issue

I installed rust, eclipse, created a new cargo project and tried to launch it.

Eclipse opened the settings panel complaining: “install missing rls component in rustup” I installed rustup component add rls-preview rust-analysis rust-src and the message was gone. It would have been nice to get a better help than “install missing rls component in rustup”

Running the application worked fine now, but debugging gave me:

image image

I should mention, that I’m a rust newcomer without hardly any C/C++ background, but I suppose this actually should run “out of the box”?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:30 (23 by maintainers)

github_iconTop GitHub Comments

1reaction
anb0scommented, Oct 21, 2018

@Boereck Yes it’s strange. I’ve just tried it again and shows now the error log:

org.eclipse.cdt.dsf.gdb
Error
Sun Oct 21 21:18:31 CEST 2018
Could not determine GDB version using command: C:\msys64\mingw64\bin\gdb.exe --version

java.lang.Exception: Fatal Python error: _Py_HashRandomization_Init: failed to get random numbers to initialize Python


	at org.eclipse.cdt.dsf.gdb.launching.GdbLaunch.getGDBVersion(GdbLaunch.java:562)
	at org.eclipse.cdt.dsf.gdb.launching.GdbLaunchDelegate.launchDebugSession(GdbLaunchDelegate.java:143)
	at org.eclipse.cdt.dsf.gdb.launching.GdbLaunchDelegate.launchDebugger(GdbLaunchDelegate.java:102)
	at org.eclipse.cdt.dsf.gdb.launching.GdbLaunchDelegate.launch(GdbLaunchDelegate.java:91)
	at org.eclipse.corrosion.debug.RustDebugDelegate.launch(RustDebugDelegate.java:107)
	at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:859)
	at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:717)
	at org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(DebugUIPlugin.java:1039)
	at org.eclipse.debug.internal.ui.DebugUIPlugin$8.run(DebugUIPlugin.java:1256)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:60)

No idea why Python shows problem during launch of the GDB executable… The same gdb.exe is working with “C/C++ Application” debug config!

1reaction
anb0scommented, Oct 18, 2018

OK, now it works with MinGW GDB 8.2 if i create other debug config like described in #138 under “C/C++ Application” and full path to executable image

with .gdbinit for rust pretty printers --> it stops at breakpoint and shows the Variables 😃 image

So there is something different in debug config under “Rust” for launching gdb with working dir or exe path…

Read more comments on GitHub >

github_iconTop Results From Across the Web

Unable to compile Rust hello world on Windows: linker link ...
I downloaded and installed the Build Tools for Visual Studio 2019. During installation I selected the C++ tools. It downloaded almost 5GB of ......
Read more >
Set up your dev environment on Windows for Rust
Hello, world! tutorial (Rust with VS Code) · First, launch a command prompt ( cmd.exe ), and cd to a folder where you...
Read more >
Rust with Visual Studio Code
Learn about Visual Studio Code editor features (code completion, debugging, snippets, linting) for Rust.
Read more >
Getting Started with Rust on Windows and Visual Studio Code
Stuck getting started with Rust in VS Code? Let me help! This post will have you compiling, debugging, and unit testing Rust code...
Read more >
Getting Started with Rust on Windows and Visual Studio Code
Change the program value to be “${workspaceFolder}/target/debug/hello-world.exe” and save the file. Your launch.json should look similar to mine ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found