Command line console for Unity 3d C# - unity3d

Is there a command line console that I can try and execute lines of code in Unity?
Something like the Chrome console for javascript, or running python on the command line?
I am on windows 8.
I saw the immediate window in MonoDevelop, but it didn't seem to work without a debug session, and when I was debugging it said it wouldn't run when the application was running:
> this
The expression can't be evaluated while the application is running.
> this
Debug session not started.
It probably wanted to be at a breakpoint, which was not obvious to get working and kept crashing when I tried various ideas. I would rather just use the console independently from debugging - just to experiment with syntax etc.
What is the easiest way to bring up a console for executing lines of C# unity code?

Related

Elixir: VS Code ExUnit cannot find Mix

I cannot load or run my tests, from within VS Code.
I'm a new user to Elixir, and to VS Code. I'm running Lubuntu 21.10 (Impish). I've downloaded Erlang/OTP 25 (.deb), and Elixir 1.14 (precompiled binary in /usr/share/elixir), and can get anything I need running in a Bash terminal. Again, in a standard QTerminal window,
erl, iex, mix, elixir, etc. all work fine.
In VS Code, however, I get some errors. I feel stupid, but I'm coming from Sublime Text, so please forgive me.
In the left pane of VS Code, ExUnit shows an error (red):
Clicking on this error gives me this, on the bottom right pane. The command line options, passed to mix test, seem to be the default configuration:
This result is bizarre to me, because I can open the integrated terminal, execute /bin/sh, and then run the exact mix test line that's displayed:
/usr/share/elixir/bin has been added to my PATH variable, in ~/.bashrc, ~/.profile, and /etc/environment.
However, I am further confused by all tests being excluded, and wonder if there's some connection to the core issue:
Note that I can run my tests just fine, using different command line options. I've tried adding tags, but that didn't fix the problem.
I tried Google'ing this, and played around with my settings. Here is what I have configured in the "User" settings.json, and I made sure nothing overrides this in "Workspace" settings:
Changing the useNativeTesting setting doesn't solve the problem.
On another (?) note, I get a "failed to run elixir" upon VS Code startup:
Again, I have no problem running commands from a Linux terminal, or from a terminal within VS Code.
Plot twist: If I remove the precompiled Elixir 1.14, and downgrade to an older version, via apt, the problem goes away. But Lubuntu 21.10 doesn't offer Elixir 1.14, and I'm really into using the new dbg() feature.
But for now, I cannot load or run my tests, from within VS Code, apparently because Mix cannot be found.
Thanks to Daniel Imms, from the VS Code team, for answering my question on Twitter:
"Try moving where ever you init mix and elixir (.bashrc?) into your .bash_profile and then logging out and in again or restarting. I'm guessing it's in your bashrc which doesn't run in non-interactive sessions like in tasks."

Debugging Deno code in either vscode or rider won't terminate debugger when program ends

I'm able to debug Deno code in both VSCode and Rider, however, the debugger continues running even after the program terminates. I tested with a single line program, console.log('hello'), and it still had the problem. When it ends, you have to remember to stop the debugger.
Is this a bug?

Run a local command before starting eclipse debugging

I want to run a terminal command just before a debug configuration starts on Eclipse.
I heard about CDT launch Groups, but couldnt get around it fully. I need to just run a normal terminal command, nothing fancy.
The aim is to copy some stuff over to the execution path before actually starting the debugging.
I managed to do this via "Launch Groups" in the CDT. Creating 2 groups, one as a c/C++ Application which calls a shell script that includes the command I want to run. And then the normal debug configuration I wanted to execute.

Python3 project debugging in Netbeans 6.9.1

This should be quite a popular problem but neither Google nor stackoverlow search helped my with it.
I want to develop Python3 programs in Netbeans 6.9.1. But when I create project, toggle a breakpoint and press on the Debug button I see following output:
[LOG]PythonDebugger : overall Starting
[LOG]PythonDebugger.taskStarted : I am Starting a new Debugging Session ...
[LOG]This window is an interactive debugging context aware Python Shell
[LOG]where you can enter python console commands while debugging
>>> File "/home/proger/.netbeans/6.9/config/nbPython/debug/nbpythondebug/jpydaemon.py", line 219
print self.debuggerFName
^
SyntaxError: invalid syntax
Debug session Abort =1
>>>
And below the log window I see:
ERROR::Server Socket listen for debuggee has timed out(more than 20 seconds wait) java.net.SocketTimeoutException: Accept timed out
So if I understand it right Netbeans tries to debug Python3 code with Jython2.something debugger. Is there a way to attach right debugger?
I met the same problem when using NetBeans. I solved this problem by editing the jpydaemon.py
change the code about 219 line
print self.debuggerFName
==>
print(self.debuggerFName)
Restart NetBeans, and it works.
I don't know how Netbeans work, but from the error message it looks like the Python 3 interpreter gets fed Python 2 code. I would venture that Netbeans hooks a debug server into Python via a breakpoint hook, so when a breakpoint is reached it starts a debugging server that the netbeans IDE then tries to talk to.
This debugserver (jpydaemon.py) evidently has not been ported to Python 3, at least not in your version.
I doubt anything is being executed by Jython. The code in this case seems to be written for Jython as it's called jpydaemon.py, and in any case Jython doesn't support the Python 3 syntax yet, so if you are trying to develop Python 3 code and run it with Jython you are likely to fail quite miserably. :-)
Update: after looking at jpydaemon.py I conclude that I guessed exactly correctly. jpydaemon contains the debugger serveice, which is hooked into the debugging hooks via sys.settrace(). So the problem you are having is quite simple: jpydaemon.py is not ported to Python 3 yet, so you can't use Netbeans internal debugger to debug Python 3 code.

Difference in Run & Debugg mode in Eclipse for Perl

I am using Eclipse along with EPIC plug in and pad walker for running my Perl project.
I am facing a strange issue
If I "Run" the project, the system fails and exits Perl without any error message.
But if I "Debug" the project and then give "Run" the same Perl scripts work fine as expected.
Could anyone let me know the difference in the two mode ("Direct Run" & "Debug & Run")?
Found it in the EPIC source code: EPIC adds the "-d" command line option for the debug target. It does some interesting things with the stdin/stdout too to remotely control the debugger. So maybe there's some side effect there? Can you share the error message?