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

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”?

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 30 (23 by maintainers)

Most upvoted comments

@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!

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…

@Boereck Good news! Thanks a lot for facing all those challenges! First thing first, as you’re the one who’s actively caring about the Windows state, it’s up to you to decide. My further comment is only a suggestion, but if you disagree, then as the one who does the stuff, you deserve to get the final word here 😉

I suggest that we first try to put the script in Rust and see how likely it is to happen. If it can be merged upstream then good, we don’t have anything to change in Corrosion, and we’ve made Rust better by the way. If we receive bad signals about it, we can workaround it by calling GDB with parameters in RLS. What do you think about it?