IntelliJ debug configuration for Perl script - perl

I am new user of IntelliJ IDE. I was successfully able to set the run/debug configuartions for my Jave programs by choosing
New Configuration->Application->Specifying Java Main class and the
Program args
But I have some Perl scripts in my application and was wondering how to do that. I don't see an option for adding a new configuration for perl scripts.
Any help of how to do this or explanation on why it cant be done would be much helpful
Thanks

It does now: https://plugins.jetbrains.com/plugin/7796
debugging is now supported too the same way as in other languages

IntelliJ does not support perl
https://plugins.jetbrains.com/wishlist/show?pr=&wid=368
Which is a pity

Related

configuring the interpreter for eclipse 4.6.0

I am trying to start a new PyDev Project and first need to setup the interpreter. The auto-config does not find a "valid interpreter". And so I must manual config. Perhaps someone with experience in this procedure knows of the specific name for the Interpreter Executable I am looking for. Thanks!
To get the interpreter you need to use, start the python interactive console in a shell and then do:
import sys; print(sys.executable)
The path printed is the interpreter you should use.
As a note, PyDev 4.6.0 is pretty old already, so, my suggestion would be upgrading to the latest release as many things were improved in the meanwhile.

Eclipse IDE: How to add this configuration during running?

For running of one of my C++ programs, using terminal(Ubuntu) I use
Note: I'm trying to Embed Python in C++. Hence, PYTHONPATH in C++.
Refer to Python/C API for more details.
$ PYTHONPATH=. ./prog_name
Sorry, I didn't know how to ask this question on Google. I want to do the same running with Eclipse. I don't know where to specify PYTHONPATH=. during running from Eclipse. How to produce the equivalent of this? I tried putting in argument list, but obviously it didn't work. Thanks!
PS. Don't downvote just because you don't understand that python scripts can be called through C++ .. Lol
Hi to all those facing the same problem, i found the solution!
setenv() is a function defined in which sets the environment variable. Just have to run it!
setenv("PYTHONPATH",".",1);
for more info on setenv:
$ man setenv
All the best :)

Attaching GDB to Eclipse to debug JNI C++ code

I'm having problems debugging a JNI application. I've read several threads in StackOverflow, like this one, this one or this one. I've also tried to start gdb in a separated shell and attach it to the running java process. In both cases, the problem is the same: GDB can't find the sources to debug. Things tried
Add "dir" line to gdbinit, pointing to C++ sources folder
Adding the C++ sources folder to the GDB debbuging configuration in Eclipse, in the "Sources" tab.
Adding set environment LD_LIBRARY_PATH=/path/to/library.so, being library.so the library file built from C++ source files
Attach ddd to the java process, but then I get an error because pthread_join.c is not found in the working directory. I don't have this file in my hard disk. I don't know what is this about.
Nothing worked. I've spent several days on this. I know my bug is in the C++ code called by the JNI wrapper, but I can't debug it. Any hints? If helps, I'm running Eclipse Juno in Debian 7 under a Parallels VM on Mac OS.
Many thanks in advance,
You need to have debug information in your native library. You should pass -g to your compiler and linker to have this information in the executable. You may also want to add -O0.
As an alternative to attaching to the Java process, you can create a C++ app and debug it directly. You just need to link in the functions you want to test. In the main function, create the VM, register the functions with RegisterNatives, and kick off a Java test class the uses them.
Hopefully, the debugger has no problem finding the sources since it is just part of the normal compile/link/debug loop of a C++ app.
I would suggest to start with the latest ADT bundle. You can even download the Mac version, so you will not even need Parallels (see a detailed instructions). Then, choose Debug Android Native Application in launch menu.

batchfiles eclipse main application external tools

I am working with Lejos and java Eclipse on Windows 7. As my machine is 64 bit it will not allow me run the standard Lejos driver as an Eclipse plugin I installed it as an external tool . I followed this super helpfull tutorial http://www.youtube.com/watch?v=hEFA0DdFhm8 However for my project I need to be able to regularly send instructions to my Nxt brick. is there anyway that I can call external tools from the main application while it is running ??Alternatively is it possible to call batch files in main programs or even make command line arguments while a program is running ??? I have read allot of forums on this and no where have I found the solution to my problem, if people have any Idea I would appreciate the help,
Thanks.
Right after allot of reading around there is and article on java world
http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html?page=1
that sums up beautifully what you should and shouldn't do .. hope this is helpfull for anyone coming after me ......

What are the exact versions of stuff you have to install in order to be able to step-debug a Scala program?

How do YOU debug a Scala program?
I mean YOU as in the person posting the Answer :) Please answer only from personal experience, not from stuff you've heard or read on the Internet. You should not believe everything you read on the Internet, especially tales of complex open-source software configurations that actually work :-)
The are many Java tools which claim to support Scala in some way or another, but I have so far struck out in trying to get any one of them to actually let me set a breakpoint in Scala code and step through it. These are big, major open-source IDEs I'm talking about here.
The main problem in getting a debugger to work seems to be the "version hell" with fast-changing IDEs, Plug-Ins, JDKs, and the Scala language itself.
Hence, the more detailed re-statement of the question is appropriate: What is the exact version number of the IDE, Plug-In, JDK, Scala, and even Operating System, that you are successfully using?
My question is related to this one, but wider in scope:
How To: debug Scala code when outside of an IDE
Thanks
In our development we use IntelliJ IDEA 9.0.1 which is available by the link below:
http://www.jetbrains.com/idea/download/
with Scala plugin installed:
http://confluence.jetbrains.net/display/SCA/Getting+Started+with+IntelliJ+IDEA+Scala+Plugin
All you need is to have project with Scala sources (probably, mixed with Java or other JVM-based languages) opened. You can compile it and run as Java application, maven goal etc. or connect to the remote application if it has been run in debug mode.
See IntelliJ help for details of adjusting debug configuration.
Cheers!
Ilya
I've worked with Eclipse and the Scala plugin for it. It works somewhat ok, if you can overlook the fact that it doesn't remember the configuration for your Scala application on the next run.
I debug my Scala programs by running relevant parts of it on the REPL, as to verify what it is really doing. Other than that, the good old println or logs.
Digressing here a bit, it has been a rare thing in my life a situation where step-in debuggers were actually required -- and, then, mostly for assembler code, though languages where testing snippets of code is difficult for some reason were more likely to require it than others which weren't.
OS: xUbuntu(GNU/Linux) 9.10
JDK:
java -version
java version "1.6.0_16"
Java(TM) SE Runtime Environment (build 1.6.0_16-b01)
Java HotSpot(TM) Client VM (build 14.2-b01, mixed mode, sharing)
(which is the Java-6-sun-version, used by the xUbuntu-installer).
Eclipse: 3.5.1 Build id: 20090920-1017
Scala-Plugin 2.7.7final
Scala 2.7.7
If possible: println-Statements, because eclipse is often tricky to invoke (does not find the main class, even after complete rebuild, closing/opening project, deleting old class-Files). The latest search for a problem ended when I 'deleted all bookmarks' - suddenly I was allowed to run the program.
Curious observation: class Bruch was what I tried to run, but eclipse allways mentioned 'Bruc' and named the runtime-configuration like this. Adding and removing characters reflected in the generated name accordingly (Bruc => Bru).