My solution is to use the IDE as a debugger but not let it compile the
code for me. Can't say how to do that in IntelliJ.
I use Eclipse and that builds with ant (if configured carefully), but I
don't get reliable results that way. By default it will compile
incrementally (and continuously), which I suppress. The IDE builds with
a different compiler from the system one, which has produced weird
results in the past.
At the moment I'm compiling with 7 and running with 9 so I'd really
rather the IDE stay out of it.
Because it is constantly checking the code, the IDE lists hundreds of
undefined symbols on a new copy of the code base until I re-discover
which JAR files to add to the build path from the extlibs folder. I
could give my current list here but the process is easily driven by
looking for failing import statements and doing an Internet search for
the package if I can't guess. More undefined symbols turn up when I
debug because I step into jars that need jars that need jars ...
The part it seems impossible to get entirely right is the use of the
"exposed" files. Either the IDE can't find some symbols (just a few), or
it can't find the associated source: I can choose which by re-ordering
the path.
When I debug, I use remote debugging. I start Jython at a shell prompt
and connect the IDE to it. I have a launch script that looks like this
(DOS):
@echo off
rem Run Jython listening for debugger on port 8000
rem echo Args: %*
dist\bin\jython -J-agentlib:jdwp=transport=dt_socket,server=y,address=8000,suspend=y %*
where %* means "all the arguments to the batch file", so after building
I type something like:
> .\remote -m test.test_file_jy
then in the IDE I connect to that port and we're off.
Jeff Allen
On 20/04/2018 01:31, Patrick Palczewski wrote:
>
> In IntelliJ, I can build using the build.xml with Ant, which enables
> me to run Jython from the IDE or the command-line.
>
> However, if I want to debug a Jython java file (or run it), the IDE
> insists on building the project and it will not compile, giving me
> "Symbol not found" errors, though everything is in its proper place.
>
> I'm guessing thatI need to tweak intelliJ's build process and there
> are specific switches that the Jython folks use to build Jython
> without Ant and from the command-line.
>
> This will be a great help, and I can include it in my blog on setting
> up IntelliJ for Jython development.
>
> Thanks.
>
> --
> /Patrick Palczewski/ *VRS# 818.208.2344*
>
|