Unable to find executable for /path/<filename> in VsCode[Kali Linux] - visual-studio-code

I am getting this error for both C++ and Rust (other languages not tried yet). Whenever I try to debug it shows this error message. I don't know anything about .json stuff or debuggers.
I have tried everything but the same error persists
The codes work without any worry on nano compiler(I haven't tried others yet because I have have to then set them up and I don't know how yet).
This is my launch.json file
I think the main problem is in the "program": "${workspaceFolder}/", section but I don't know any better. I do not remember is if the launch.json file was the same in my cpp launch.jason as well but I am thinking on using notepad at this point cause this is too hard.
There might be some doc or whatever there but I don't get this stuff, please specify what's wrong.
EDIT: Found the error. There was no executable file created. i.e., 'main.rs' was present but no 'main'.

Related

VS Code Error: "You don't have an extension for debugging YAML. Should we find a YAML extension in the Marketplace?"

I'm trying to compile a program, and when I try to debug and run the script I get an error that reads "You don't have an extension for debugging YAML. Should we find a YAML extension in the Marketplace?"
I opened VS Code and tried to run the script, but I got the error.
Assuming you already have the necessary language support, and the program you are attempting to compile is in dart, you may be encountering this issue.
As stated in the linked thread, select main.dart so it's the currently active file, then attempt to debug and run. One cause of this error seems to stem from having pubspec.yaml as the current file open in VS Code.

eclipse pydev debug source lookup

So I have anaconda installed and make a separate environment for all my projects. Normally I just use PYDEV to create a new interpreter pointing to the anaconda enviornment and load the project in eclipse and all is good. After doing the last one though 95% of the time I go to debug I keep getting the error
An internal error occurred during: "Debug Source Lookup".
java.lang.IllegalArgumentException
The other 5% it kind of works as I can follow one script or a function before it starts breaking.
I've tried reloading the project, interpreter and conda enviornment to no luck. All my past projects which use to work are also now giving the same error.
The funny thing is when I'm in the debug perspective though it does seem to be working (I can see the Variables and use the interactive console to test stuff), but anytime I try to step into, over ect I get the error (even though it does seem to be working). So for the image above I can go through the code fine until it tries to jump to the other file which throws the error, but if I step into it I can manually open that file and walk through the function (just each step throws the error) and still interact with the code which is in the position through the console.
Any ideas how to fix?
Well, it may be something specific to this use-case (for instance, if the code for some object is evaluated and the source code is not really available for the debugger this is actually expected).
Can you provide the full stacktrace from the error log? (see: http://www.pydev.org/faq.html#HowdoIReportaBUG for details on how to get it)

Why can I not compile TypeScript anymore?

I'm doing some web development and I did a commit & sync via GitHub's Mac GUI, then I installed some Mac updates that required a restart (I don't know what the updates were). When I opened my project in PHPStorm again, I found this error when I tried compiling my TypeScript:
/usr/local/bin/tsc
env: node: No such file or directory
I know the compilation was working before. My web application had no issues. This question deals specifically with me being able to do this yesterday, with no changes to the FileWatcher configuration.
I have my TypeScript Compiler in usr/local/bin/tsc (which I have checked as a valid path to a typescript compiler alias). When I click on the alias, It opens a terminal window and runs typescript, so I know it's there. PHPStorm also complains if I try to change the file path, saying I must pick a valid executable.
I modified my Environment Variables on the advice of Dan Clark's site but that hasn't changed anything. I don't have the reputation to upload a photo of my File Watchers Dialog.
Does anyone know why I am getting this error, and how it can be fixed? I mention GitHub because that's the last thing I did before things stopped working: a commit & sync, then a restart to install some Mac updates.
Both which node and which tsc point in the right direction. Just tsc also works.
My solution was to use the directory of the actual TypeScript compiler at /usr/local/lib/node_modules/typescript/bin/tsc
instead of
/usr/local/bin/tsc, which is the alias.
That lets me compile using the FileWatcher.
As for why this happened, it's still a mystery to me.

cannot load runtime-gdb.py

I'm trying to debug a program written using Go inside eclipse. I can set and hit breakpoints pretty consistently, but I cannot view the contents of my variables. When I start debugging the program, I always get the following error on my console.
warning: File "/usr/local/go/src/pkg/runtime/runtime-gdb.py" auto-loading has been declined by your `auto-load safe-path' set to "$debugdir:$datadir/auto-load".
To enable execution of this file add
add-auto-load-safe-path /usr/local/go/src/pkg/runtime/runtime-gdb.py
line to your configuration file "/home/johnlawrie/.gdbinit".
To completely disable this security protection add
set auto-load safe-path /
line to your configuration file "/home/johnlawrie/.gdbinit".
For more information about this security protection see the
"Auto-loading safe path" section in the GDB manual. E.g., run from the shell:
info "(gdb)Auto-loading safe path"
Thinking that the problem might be due to the error message, I put the entry into my .gdbinit file as instructed. However, I get the same message every time I run as if I did nothing at all. This is the contents of my /home/johnlawrie/.gdbinit file
add-auto-load-safe-path /usr/local/go/src/pkg/runtime/runtime-gdb.py
Any ideas what I need to do to make this change take effect? I have tried logged off and back in.
Thanks,
John Lawrie
It did learn what was happening. When gdb is started from Eclipse/CDT, it is started with option -nx, which means it doesn't load .gdbinit in the home directory.
I was able to get this to work by creating a .gdbinit file as a peer to the src, bin, and pkg directories in my workspace and adding the following line to it
set auto-load safe-path /usr/local/go/
It should be add-auto-load-safe-path /usr/local/go/src/pkg/, not the path to the script.
Also keep in mind that gdb doesn't really work with Go, specially v1.3.
From http://golang.org/doc/gdb:
GDB does not understand Go programs well. The stack management,
threading, and runtime contain aspects that differ enough from the
execution model GDB expects that they can confuse the debugger, even
when the program is compiled with gccgo. As a consequence, although
GDB can be useful in some situations, it is not a reliable debugger
for Go programs, particularly heavily concurrent ones. Moreover, it is
not a priority for the Go project to address these issues, which are
difficult. In short, the instructions below should be taken only as a
guide to how to use GDB when it works, not as a guarantee of success.

Problems using netbeans 7.01 with CMake 2.8.6

so once again, I'm having a little problem I can't figure out myself. Meaning, I'm pretty sure I know what the problem is, I just can't fix it.
I'm developing in C++ using Netbeans 7.01 with CMake 2.8.6. However, when I'm trying to build a project, I get the following error from CMake:
CMake Error: The path to the source directory:
H:/Projects/Netbeans/CppApplication_1/CONF=Release
contains unsupported character '='.
Please use a different source directory name.
Please note, that "CONF=Release" isn't a folder. It seems to be a configuration flag set by Netbeans, as it changes when I'm trying a debug build. So, my guess here is, that theres a space missing, or something similar. Unfortunately, I can't figure out where to change that. There are no options in any related Netbeans window, I can't find anything related in the configuration files for netbeans itself or the project either.
Did anyone here have experienced the same problem and found a solution to it? I would be very glad to hear it. If there's any information missing, let me know, I will add them as fast as possible.
Edit:
Just noticed there is already version 7.1 of netbeans, nice to know. However, even with this version, the same problem occurs.
You must specify the command you ran to allow for the error to be identified. However, it looks like you missed the "source-path" parameter.
The cmake command ends with the path to source and should be something like:
cmake -D CONF=Release <path to source>