Text Not Displaying In Console

Hard to be a noob…why isn’t print displaying in the console?

function setup() {
  createCanvas(500,500);
  print("ummmmmmm.....");
}

function draw() {
 
}
1 Like

Are you using the editor.p5js.org to do this?

I copied and pasted your code there and I noticed the double quote characters that you are using is not proper. Either change them to the proper double quotes (not sure what keyboard language settings you have setup there) or, since you are working with javascript, you can use single quote: print('ummmmmmm…');

Kf

1 Like

I’m using the p5.js mode in Processing.

I only used the single quote because it is what is used in the reference example. Since double quote wasn’t working I used them both as I have no way of knowing which is correct.

1 Like

for p5.js you use console.log(whatToLog);

2 Likes

although it may not work in processing ide…

1 Like

console.log doesn’t seem to work either. I sent an email to Fathom Information Design whose name is listed in the Mode Install Window. Lets see what they say if anything

1 Like

yeah i recommend you just make a javascript setup this guy has some good tutorials:

2 Likes

Ok, just realized we are doing this wrong. In p5.js mode, when you print something, it will not appear in the console in the PDE. Instead, when you run a p5js sketch, the PDE will launch a browser session and your sketch will be render there. To see the output from print() or console.log(), you need to use the developer tools that comes with the browser. For instance, in firefox you open the developer tools and then hit the console tab. For more information, you could:

  • Check previous posts talking about developers tools
  • Check videos from Daniel Shifman
  • Check resources like Happy Coding

If you try the latest release of the online editor, the console is integrated as part of the online editor IDE. You should check it out.

Kf

5 Likes

Kinda clumsy. I’ll just text var values to the screen. I don’t like online editors for some reason… Dunno why.
Thanks for all your time.

1 Like

In addition to what @kfrajer said I do reccomend you setup p5.js using atom:


just scroll down and find your OS and install it.

2 Likes

Trying to get Atom to work with p5.js but so far no luck. Can’t get Brackets to work either.

Well, I’ve got Atom working well but how can I auto-update in Atom. Right now I have to save a program for any changes in the program.

1 Like

I synchronize my codes by using one-drive. You need to get used to using save shortcuts like:

Ctrl+s in Windows os
and
Cmd+s in Mac os