How to debug in a development development environment (PDE), there is also a plugin to support intellisense

I am new to processing development environment, I did my homework and all I found was to import processing libraries into Java IDE (eclipse) and use debugging, I am wondering if there is a PDE plugin that can help with intellisense and debugging as for small sketches PDE is very convenient.

+7
source share
4 answers

debugging

Since the start of processing 3, debugging is now a built-in function of the IDE processing.

In the screenshot below you will see the new Debug menu. I set breakpoints in the setup() and draw() methods as indicated by <> labels in line numbers. On the right is a pop-up window with a list of values ​​of variables and objects, etc.

enter image description here

Intellisense

In the "Settings" menu, check the box " End code with Ctrl-space" .

enter image description here

Then you can start typing a function like ellipse and press CTRL + Space to display intellisense. Moreover, this includes access to the properties or methods of the object by input . after which intellisense should automatically appear.

Using a different IDE

Finally, you can take advantage of a more powerful IDE by importing the core.jar processor into any Java project. The core.jar file is located relative to your Processing installation, for example:

OSX: /Applications/Processing 3.0.1.app/Contents/Java/core/library/core.jar
Windows: \Program Files\processing-3.0.2\core\library\core.jar

When processing 1 and 2, this should be run as an applet . In processing 3, run the Java application . Here is an example to demonstrate:

 import processing.core.*; public class Main extends PApplet { // In Eclipse, run this project as Java Application (not Applet) public static void main(String[] args) { String[] a = {"MAIN"}; PApplet.runSketch(a, new Main()); } public void settings() { // <-- that different size(500, 500); // necessary here to prevent runtime IllegalStateException } public void setup() { // other one and done operations } public void draw() { ellipse(mouseX, mouseY, 40, 40); } } 

Check out this post if you want to write processing code in Eclipse for several classes.
https://processing.org/tutorials/eclipse/

+7
source

Unfortunately, you cannot get these features in the Compact Processing development environment.

You can get autocompletion / intellisense with a decent Java IDE like IntelliJ or eclipse. Personally, I am pleased with how the Proclipsing eclipse plugin integrates with processing (simple project export, library management, etc.)

Check out this video setup guide : Proclipsing video snapshot

0
source

If you use the latest version 2.0b7 and enable the “EXPERIMENTAL” mode (upper right corner), you have access to a small set of tools (breakpoints, step by step) and a real-time debugging console. It cannot compare with other platforms such as VS or Eclipse, but it is a good start and does some of the work done.

0
source

I have never tried, but for Processing 2.x there is this debugging tool. This was discussed in this section during the development process of the forum.

0
source

All Articles