mirror of
https://github.com/kusti8/proton-native.git
synced 2026-05-15 14:15:50 -06:00
[GH-ISSUE #324] How do you log to the console? #216
Labels
No labels
bug
documentation
enhancement
libui issue
pull-request
question
wait for libui implementation
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/proton-native#216
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @NatyveCoder on GitHub (Apr 27, 2021).
Original GitHub issue: https://github.com/kusti8/proton-native/issues/324
Is your feature request related to a problem? Please describe.
I have no idea how to debug my application
Describe the solution you'd like
I expected console.log() to log to the terminal, but there is no output in the terminal
Describe alternatives you've considered
I'm not sure what alternatives there are.
Additional context
I'm trying to do a simple input-output app as a hello-world example. Type in text in a textbox up top, and the hashed output is output to the Text component. There is no output in my text component, and I have no way of debugging to see if my hash function is being called when the TextInput value is being changed.
@jcolag commented on GitHub (Jun 11, 2021):
For what it's worth (a month and a half later), I haven't had a problem getting text to the console. Or, rather, as long as I put
console.log()somewhere sensible that doesn't break the build--because I have a tendency to clumsily drop it in the middle of a render--it worked.If you don't mind my asking, how are you triggering state changes? In my note-taking program, my multi-line
TextInputincludesonChangeText={text => this.noteUpdated(text)}, wherenoteUpdated()handles state-tracking and other things. A lot of logging statements have gone in there, though I don't think there are any left just now.I've also had decent success with Winston for a more complicated project, where I wanted to keep the output.