Console.log output not showing

I’m having some trouble getting my app to log anything at all to the console. I’ve input several console.log(‘logstuff’) calls here and there in the app, but at no point do any of them appear in any console. Examples:

<Text onPress={console.log(‘logstuff’)}>[CAPTURE]

logStuff = function() {

Nothing appears in the XDE console. Nothing appears in the XDE developer tools. Nothing appears in the Chrome remote debugging tools. Where is all my logstuff going?

Hey there - the input to onPress needs to be a function. Try doing <Text onPress={() => console.log('logstuff')}> instead. If it still doesn’t work, could you post some more examples of your code where you’re trying to log to the console?

1 Like

Heya! Thanks for the tip!

Thankfully it turns out I’m actually just a fool who started working in a new directory but kept XDE open on the old directory. I booted up the project from the new directory and the console logs just fine.

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.