Tips and Tricks on console.log (consoleDebug) [solved]

Discussion in 'Learning Javascript' started by Jonforum, May 23, 2017.

  1. Jonforum

    Jonforum Veteran Veteran

    Messages:
    1,586
    Likes Received:
    1,364
    Location:
    Canada / Québec
    First Language:
    French
    Primarily Uses:
    RMMV
    What is your advice or trick for the console.log.
    I have a small problem that makes debugging difficult, especially when I need to get information during an UPDATE process.
    How do you deal with the debug console during console.log inside a update(LOOP) processes.

    The only trick I have found is
    To write:
    Code:
    Console = null;
    I'm lazy that makes me waste time.
    or
    Copy past the update prototype with console.log and = null to crash the games.
    Waste more time.!!

    Is there a way. example:, right click, & break ,Pause,Stop console debug???
    Or hiding option that will allow me to crash the games easily or put the debug at break or Stop.

    This is probably a bug in the version of node or chromius rmmv use, but the shortkey.
    F8 or CTRL+\ (for stop console) Not work for me !
     
    Last edited: May 23, 2017
    #1
  2. Hudell

    Hudell Dog Lord Veteran

    Messages:
    3,323
    Likes Received:
    2,961
    Location:
    Brazil
    First Language:
    Portuguese
    Primarily Uses:
    RMMV
    I didn't understand what your issue is.
     
    #2
  3. Gamefall Team

    Gamefall Team Nebula Games Leader Veteran

    Messages:
    344
    Likes Received:
    431
    Location:
    Italy
    First Language:
    Italian
    Primarily Uses:
    RMMV
    Mmh, I see. For stopping the process of the game, you can try to write in console:

    Code:
    delete PIXI
    This will stop your game :)
     
    #3
    Jonforum likes this.
  4. Jonforum

    Jonforum Veteran Veteran

    Messages:
    1,586
    Likes Received:
    1,364
    Location:
    Canada / Québec
    First Language:
    French
    Primarily Uses:
    RMMV
    I think I had a better idea, I had completely forgotten that I had a keyboard with macro programmable code.

    i have a Tt eSPORTS Challenger with Macro key, Ideal for programming code !!
    I have configured a Key [T6] macro for do
    console = null +[Enter]


    I would have preferred to be able to do it with my mouse(logitheque), example button of the center which calls the shortcut
    [F8 or CTRL+\ ]
    But those key not work in rmmv console.

    But the keyboard is also fast., With a single key to stop the console in a loop!.
    Sometimes we forget that we have the tools to our disposal. !

    @Hudell
    I'm talking when you add console.log() to debug and study the system that finds it in a loop..
    This freezes the console and prevents to navigate properly in the class and object to study some value.
     
    Last edited: May 23, 2017
    #4
    Gamefall Team likes this.
  5. Hudell

    Hudell Dog Lord Veteran

    Messages:
    3,323
    Likes Received:
    2,961
    Location:
    Brazil
    First Language:
    Portuguese
    Primarily Uses:
    RMMV
    You could simply pause the JS execution with the pause button, then remove the console.log line using the console's code editor, hit ctrl+s to apply and F8 again to continue the game from where it paused.
    Those changes won't be saved in the actual JS file, but they will affect the game until you close or reload it.
     
    #5
  6. Jonforum

    Jonforum Veteran Veteran

    Messages:
    1,586
    Likes Received:
    1,364
    Location:
    Canada / Québec
    First Language:
    French
    Primarily Uses:
    RMMV
    @Hudell
    Pause JS , ... !!!
    This is my question, but the basic codes do not work.
    [F8 or CTRL+\ ] say is for pause or stop !!! but not work
    How to do ?
    i make you a little video to understant.

    If you have any trick I am taker.
    I think rather a bug in the software ...
     
    #6
  7. Hudell

    Hudell Dog Lord Veteran

    Messages:
    3,323
    Likes Received:
    2,961
    Location:
    Brazil
    First Language:
    Portuguese
    Primarily Uses:
    RMMV
    Open the "sources" tab before pressing F8. The shortcut should work from there.
    Another way to pause it is to type "debugger" in the console and press enter.
     
    #7
    Sarlecc and Jonforum like this.
  8. Sarlecc

    Sarlecc Veteran Veteran

    Messages:
    454
    Likes Received:
    209
    First Language:
    English
    Primarily Uses:
    RMMV
    If the console has debugger functionality you can use this to pause the code:
    Code:
    function test () {
        debugger;
        return "this gets called after the process is resumed";
    }
    Edit: ninjad :p
     
    #8
    Jonforum likes this.
  9. Jonforum

    Jonforum Veteran Veteran

    Messages:
    1,586
    Likes Received:
    1,364
    Location:
    Canada / Québec
    First Language:
    French
    Primarily Uses:
    RMMV
    OMG loll
    Thank you infinitely to you it works. !!!
     
    #9
  10. Jonforum

    Jonforum Veteran Veteran

    Messages:
    1,586
    Likes Received:
    1,364
    Location:
    Canada / Québec
    First Language:
    French
    Primarily Uses:
    RMMV
    Code:
    Another way to pause it is to type "debugger"
    other strange bug , IF console are pause , we can not close the windows,we need to Resume or kill process, but thank is work.
    That was what I wanted to do, thank you for this trick.
    now in can configu my mouse to do it ! :)

    this is for you hudell :thumbsup-left::rock-left:
    cartoon-bone-hi.png
     
    Last edited: May 23, 2017
    #10
    Hudell likes this.

Share This Page