Clear errors and debugging

About Monkey 2 Forums Monkey 2 Development Clear errors and debugging

Tagged: 

This topic contains 12 replies, has 2 voices, and was last updated by  Mark Sibly 2 years, 9 months ago.

Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #3830

    Ethernaut
    Participant

    I’m enjoying M2 a lot, but one thing I miss from M1 is the clear message when an error occurs in debug mode. It used to look like this, with each line that led to the error clearly shown.

     

     

    Now a similar problem (accessing a null object) looks like this, which is basically unreadable for me:

    Are better error messages something on the roadmap?

    On the same topic, I see that Ted2 has a debugger, but I’m a total newbie and have never used a debugger before. I see that you can “step” through the running code, but that goes through absolutely everything, including standard modules. Is there a way to filter things? And how do I set a debug breakpoint, watch variables, etc (all the things Google tells me are important in a debugger!). Couldn’t find any info in the docs.

    Cheers!

    #3831

    Mark Sibly
    Keymaster

    The mangled output is what Ted2 uses to produce the debugview, so I’m guessing you’re not using Ted2?

    I can clean this up, but I need a way for apps to tell if they’re running in Ted2 or not.

    The debugger itself is pretty primitive right now, generally only useful for ‘post mortem’ debugging (which is all I’ve ever used debuggers for anyway). More features will come, but some will likely have to wait until reflection and other features are added.

    #3833

    Ethernaut
    Participant

    Yup, I’ve been using Mollusk as the ide.

    I haven’t had a lot of luck with Ted2 in OS X. If I run the Monkey2 (Macos) file under the main folder I can’t even open a file. Running ted2_macos under bin gets me a little further, but not much. I can open files, but they don’t show until I close Ted and reopen it.

    I’m checking the same error now with Ted2 debugger running, pretty cool!
    Thanks!

    #3834

    Mark Sibly
    Keymaster

    What versions of macos/monkey2 are you using?

    #3836

    Ethernaut
    Participant

    Monkey2 1.0.5, OS X El Capitan 10.11.6. But I’ve been having this issue for quite a while with previous versions.

    I wasn’t sure what the state of Ted was in for OS X yet, so I never filed a bug.

    #3837

    Ethernaut
    Participant

    Opening a file from the “Files” side panel works fine, it’s just when I use the file open dialogue that the file refuses to show until I restart Ted2.

    Even doing “open project” doesn’t work until Ted is restarted.

    #3838

    Mark Sibly
    Keymaster

    Weird, using exactly the same setup and it doesn’t happen here.

    I did find one minor thing but it’s very unlikely to be the problem – have committed the fix anway, you’ll need to rebuild ted2.

    Also, it does take quite a while to open the first time – but that’s true of pretty much everything on my Mac until it ‘warms up’.

    Does it never show at all? Never close? What are the symptoms exactly?

    #3839

    Ethernaut
    Participant

    It never shows up, and I get weird visual glitches (hovering the mouse over menus causes them to flicker) until I restart Ted. Again, using the side Files panel works fine, this only happens using “File/Open”

    Here’s a video of what happens:

    https://dl.dropboxusercontent.com/u/446189/monkey/tedFileOpenBug.mov

    #3840

    Mark Sibly
    Keymaster

    What’s that funky mouse circle thing – is it an addon? Can you disable it?

    #3842

    Ethernaut
    Participant

    That’s just an option in the Quicktime screen recording! It shows you exactly when I click the mouse button.

    I don’t have it normally, and Ted still behaves the same. 🙂
    I also tried turning off OS X “dark” theme, no effect.

    #3843

    Mark Sibly
    Keymaster

    Holy crap, can reproduce it!

    I usually have my file browser in ‘column view’, but if I change to ‘grid view’ (ie: like yours) I get the same problem!

    I can fix it by changing back to column view (or list view) after which it happens again but is fixed the next time I start Ted2.

    Will look into this – very strange though!

    #3854

    Ethernaut
    Participant

    Yay, thanks! Switching to column view fixes the glitch here as well.

    Getting M2 to spit out human readable info for other ide’s would be great. I imagine a quick stop gap solution would be a command line option that an ide could use (instead of trying to detect whether Ted2 is in use or not) to force human readable output, at the cost of losing debug data.

    Cheers!

    #3855

    Mark Sibly
    Keymaster

    You should be fixed on github too.

Viewing 13 posts - 1 through 13 (of 13 total)

You must be logged in to reply to this topic.