Skip to content
This repository has been archived by the owner on Nov 18, 2022. It is now read-only.

debugging support #5

Open
nrc opened this issue Oct 1, 2016 · 11 comments
Open

debugging support #5

nrc opened this issue Oct 1, 2016 · 11 comments

Comments

@nrc
Copy link
Member

nrc commented Oct 1, 2016

Integration between LLDB and VSCode exists (https://marketplace.visualstudio.com/items?itemName=vadimcn.vscode-lldb / https://github.com/vadimcn/vscode-lldb) and by the sounds of it, has been tested and works with Rust code (and the author is a Rust contributor).

Alternatively, https://marketplace.visualstudio.com/items?itemName=webfreak.debug / https://github.com/WebFreak001/code-debug supports both GDB and LLDB (GDB has or will have better Rust support due to some integration into the debugger itself).

It seems, therefore like it should be relatively simple to package (or script) one of those plugins with the Rust/lldb/gdb script and our plugin and offer a decent debugging experience out of the box and without too much effort.

@doxxx
Copy link

doxxx commented Jul 25, 2017

I should note that the debugging experience on Windows with those extensions/tools leaves rather a lot to be desired. For example, the values of function parameters are unavailable and visualization of types any more complex than scalars or strings are generally unhelpful -- i.e. a raw pointer value or only the first level of information in a more complex type like Option.

I don't know if there's much you can do about this since it requires improved support in those extensions and tools, but it's something to bear in mind.

@sherry-ummen
Copy link

Shout out if you want this to be done soon... 👍

@RReverser
Copy link

@doxxx On Windows official C/C++ extension debugs Rust really well. In works on Linux too but not as well, so I tend to just use different extensions depending on current OS.

@doxxx
Copy link

doxxx commented Feb 10, 2018

@RReverser I've had some success with the WinDbg extension. Although it's still too difficult to run tests in the debugger than it should be.

@xmine64
Copy link

xmine64 commented Apr 30, 2019

It would be great if I press button 'F5' on my keyboard to start my rust program with debugger (or even without, Just build and run the code).

@PhilParisot
Copy link

I am also looking for this. A debugger is the main thing I look forward to in VScode extensions. It's disappointing that this hasn't been done already.

@slanterns
Copy link

The extension CodeLLDB has already offered out-of-box debugging experience for rust (e.g. it can generate launch.json file for rust automatically), can it be included in rls-vscode?
Also, what's the current state of #582 ?

@Yuri6037
Copy link

Yuri6037 commented May 18, 2021

This evening I've just tried debugging and I was very dissapointed! On my Linux machine with VSCode C++, CMake and MS C++ extensions debugging was quite simple, no files to generate everything managed by CMake and MS C/C++ extensions. With this extension absolutely no run/debug capability is integrated.

I then tried if by any chance the commercial JetBrains CLion IDE would do better and well it was FAR FAR better. Everything worked out of the box. Exception to most warnings like unused functions, unused variables which JetBrains cannot see but VSCode can.

This really needs to be fixed as on all other C/C++ setups including Windows and Visual Studio or even Xcode it works out of the box.

It's really annoying to have to switch to CLion just for debugging...

EDIT: I think I was wrong it appears after tweaking CLion settings that it is also able to run all the warnings. So let me reformulate: as long as Rust VSCode extension won't be able to achieve debugging like CLion can with gdb, I will use CLion.

@RReverser
Copy link

With this extension absolutely no run/debug capability is integrated.

Yes, that's what the issue is about.

Did you check suggestions in this thread, in particular CodeLLDB in both the description and the last comment #5 (comment))? If not, try them out - they already provide debugging experience without switching to a different IDE.

This issue is merely about integrating functionality between two extensions.

@RReverser
Copy link

More generally though, sure, if you find JetBrains IDE better for your use-cases, use that. It's great that there is a choice of IDEs for Rust!

@PhilParisot
Copy link

Any updates for this?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants