-
Notifications
You must be signed in to change notification settings - Fork 166
debugging support #5
Comments
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. |
Shout out if you want this to be done soon... 👍 |
@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. |
@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. |
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). |
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. |
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. |
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. |
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! |
Any updates for this? |
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.
The text was updated successfully, but these errors were encountered: