Questions about VS Code (C++ Debugging) reddit / freebsd ---------------------------------------------------------------------- _krck_ · 2021-09-17 17:57 Hello, currently trying to setup a C++ dev environment (but no full blown IDE) and ended up with VS Code. Mostly because i have some experience with the normal VS and zero with Emacs :D But a few issues arose. Installed with pkg (latest version) and added the C/C++ Extension form Microsoft. Configured the build task with clang and the debug launch with gdb and it all works ... to some extent. The issues: * Debugging does start and i can skip over/into the code, but variables, runtime values, call stack, etc. are not visible/displayed. Not when i hover over the variable, and not in the "sidebar". Not as normal user and not if i start it as root (just to test) * Syntax highlighting (squiggly lines), auto completion, etc. does not work. Installed different extensions (e.g. "Better C++ Syntax") but they did nothing. After vs code restarts and even system reboots still nothing What i tried: * security.bsd.unprivileged\_proc\_debug=1 ... took me an hour to realize that this was 0. Made debugging possible, but variable values, call stack, etc. still not showing * gdb works in terminal/console mode ... but only as root! My normal user (in the wheel group) cant debug at all Do i need the linux compatibility? am i missing some other kernel or config flags? Is it a user-rights problem? Which Extensions can you recommend? As always, thanks a lot in advance! Very helpful community! ---------------------------------------------------------------------- unitrunker2 · 2021-09-17 18:09 Try juci++. If you like C++, clang, and cmake - it gets the job done. [https://www.freshports.org/editors/jucipp/](https://www.freshports.or g/editors/jucipp/) https://gitlab.com/cppit/jucipp ---------------------------------------------------------------------- reddit_original · 2021-09-17 19:58 >Mostly because i have some experience with the normal VS and zero with Emacs I've done software development on FreeBSD for nearly 20 years without emacs. That's not a knock against emacs. I just never had or took the time to learn it well enough. I'm only making the point that using a Microsoft product geared more toward Windows development is probably the last tool I would ever consider using for BSD/Unix/Linux development. ---------------------------------------------------------------------- AxeyEndres · 2021-09-18 00:24 Why not use vim + makefiles? ---------------------------------------------------------------------- _krck_ · 2021-09-18 05:57 What did you use? What did emerge as your dev tools of choice over these 20 years? Only used vs code because i know the „look and feel“ and was confident i could set it up in < 15min and start coding. Easy. Now 4+ hours in and half the stuff still not working i know that i could have started from scratch in any editor i never even heard of, and would have gotten further ... So im open to any tool suggestions :) ---------------------------------------------------------------------- _krck_ · 2021-09-18 06:06 I only know the absolute vi basics and assumed vscode would be a quick and easy setup of a well known environment. But i was mistaken :D Vim is next in line. Will try this for sure. Is it easy, to set up debugging and a „file explorer“ list on the side? ---------------------------------------------------------------------- _krck_ · 2021-09-18 06:08 Thanks! Never heard of it, but i will try either this or vim next. ---------------------------------------------------------------------- reddit_original · 2021-09-18 09:00 FreeBSD is my IDE but I'm at the airport going on vacation so...till next time.... ---------------------------------------------------------------------- AxeyEndres · 2021-09-18 10:54 Vim is a text editor, for debugging you can use gdb or lldb and for file management you can use standard ls mv find grep mkdir etc Thats what I did my entire life ---------------------------------------------------------------------- TorMazila · 2021-09-18 18:41 Because it's not what "IDE" means. Using an editor with syntax highlighting and such is just a part of what people (even from the MSDOS era) expect from the IDE. Tweaking makefiles is fun for sure - but just compare that to even 1990s DOS tools. Step-by-step execution, easy variables monitoring (and maybe modification), breakpoints and so on. gdb usability just doesn't cut it in terms of usability - even compared to the ancient Turbo C and alike. Surely it is more capable - but the usability isn't there. The learning curve for "click-click in GUI" and "RTFM, type in, check out" toolsets is very different. vi/vim/emacs are not the only editors out there. mcedit or le can fit your needs. le has makefiles support - press F9 and get make launched :) ---------------------------------------------------------------------- [deleted] · 2021-09-20 10:36 [removed]